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 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?

> The 'fake' lock connects the lock chain inside the work to the
> lock-chain at flush_work() and thus detects these. That's perfectly
> fine.
>
> It just seems to confuse the completions stuff... Let me go read Dave's
> email and see if I can come up with something.

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