lkml.org 
[lkml]   [2017]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation
On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote:
> Let me show you a possible scenario with a leaf lock:
>
> lock(A)
> lock(A) wait_for_completion(B)
> unlock(A) ...
> ... unlock(A)
> process_one_work()
> work->func()
> complete(B)
>
> It's a deadlock by a lead lock A and completion B.

By having wait_for_completion() in it, A is not a leaf lock.

\
 
 \ /
  Last update: 2017-09-05 12:53    [W:0.164 / U:4.840 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site