lkml.org 
[lkml]   [2010]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V3 PATCH] kthread_work: Make lockdep happy
On Wed, Dec 22, 2010 at 11:23:05AM +0800, Yong Zhang wrote:
> From: Yong Zhang <yong.zhang0@gmail.com>
> Subject: [V3 PATCH] kthread_work: Make lockdep happy
>
> spinlock in kthread_worker and wait_queue_head in kthread_work
> both should be lockdep sensible.
> So change the interface to make it suiltable for CONFIG_LOCKDEP.
>
> Reported-by: Nicolas <nicolas.mailhot@laposte.net>
> Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> Signed-off-by: Andy Walls <awalls@md.metrocast.net>
> Tested-by: Andy Walls <awalls@md.metrocast.net>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>

Applied with the following comment update (because the term "special
work" was a bit too confusing given the context) to wq#for-linus.
Will push out to Linus in several days.

+/*
+ * kthread_worker.lock and kthread_work.done need their own lockdep class
+ * keys if they are defined on stack with lockdep enabled. Use the
+ * following macros when defining them on stack.
+ */

Thank you.

--
tejun


\
 
 \ /
  Last update: 2010-12-22 10:37    [W:1.094 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site