lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING
On Tue, Aug 22, 2017 at 06:33:37PM +0900, Byungchul Park wrote:
> On Tue, Aug 22, 2017 at 11:21:41AM +0200, Peter Zijlstra wrote:
> > On Tue, Aug 22, 2017 at 05:51:00PM +0900, Byungchul Park wrote:
> > > On Tue, Aug 22, 2017 at 09:52:38AM +0200, Peter Zijlstra wrote:
> > > > That wouldn't work. That annotation is to help find deadlocks like:
> > > >
> > > >
> > > > mutex_lock(&A)
> > > > <work>
> > > > mutex_lock(&A)
> > > >
> > > > flush_work(&work)
> > > >
> > >
> > > I meant:
> > >
> > > mutex_lock(&A)
> > > <work>
> > > lockdep_map_acquire_read(&work)
> > > mutex_lock(&A)
> > >
> > > lockdep_map_acquire(&work)
> > > flush_work(&work)
> > >
> > > I mean it can still be detected with a read acquisition in work.
> > > Am I wrong?
> >
> > Think so, although there's something weird with read locks that I keep
> > forgetting. But I'm not sure it'll actually solve the problem. But I can
>
> I mean, read acquisitions are nothing but ones allowing read ones to be
> re-acquired legally, IOW, we want to check entrance of flush_work() and
> works, not between works. That's why I suggested to use read ones in work
> in that case.

Does seem to work.

\
 
 \ /
  Last update: 2017-08-22 12:09    [W:0.075 / U:1.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site