lkml.org 
[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] workqueue: Catch more locking problems with flush_work()
On Wed, Apr 18, 2012 at 08:25:57PM -0700, Stephen Boyd wrote:
> @@ -2513,8 +2513,11 @@ bool flush_work(struct work_struct *work)
> wait_for_completion(&barr.done);
> destroy_work_on_stack(&barr.work);
> return true;
> - } else
> + } else {
> + lock_map_acquire(&work->lockdep_map);
> + lock_map_release(&work->lockdep_map);
> return false;

We don't have this annotation when start_flush_work() succeeds either,
right? IOW, would lockdep trigger when an actual deadlock happens?
If not, why not add the acquire/release() before flush_work() does
anything?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-04-19 17:31    [W:0.116 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site