lkml.org 
[lkml]   [2008]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/2] lockdep vs recursive read locks
From
Date
On Thu, 2008-03-13 at 11:25 +0000, Hugh Dickins wrote:
> On Wed, 12 Mar 2008, Peter Zijlstra wrote:
> > We seemed to have some lockdep trouble wrt recursive read locks. Today Gautham
> > asked me some specific questions about it, which led to these patches.
> >
> > IIRC Hugh ran into something similar a while back. This hopefully fixes it.
>
> Hmm, I don't remember that myself: can you jog my memory?

Sadly that is about as far as my memory went:

Hugh spotted problem that lockdep missed, involves r/w lock.

> What I do remember is that when I fixed madvise(MADV_REMOVE i.e. holepunch)
> not to hold mmap_sem (at that time down_write but today down_read, though
> would still be bad) across vmtruncate_range which takes i_mutex (contrast
> writing from an unfaulted area that takes i_mutex then down_read mmap_sem),
> Ingo asked me offline if lockdep caught that and it didn't. Just tried
> again now, with your patches applied, and madvise_remove restored to its
> old misbehaviour, and it looks like lockdep still doesn't catch it
> (but suspect me of pilot error if you find otherwise).

Ah, ok. Yes, the rwsem will not be affected by this change as it was
specific to recursive readers, which is only allowed by rwlock_t.

I'll try to look into the scenario you described. Would be interesting
to figure that out.



\
 
 \ /
  Last update: 2008-03-14 08:39    [W:0.058 / U:5.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site