All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] rcu: fix lockdep for tracepoint
@ 2010-03-16  9:00 Lai Jiangshan
  2010-03-16 13:08 ` Mathieu Desnoyers
  2010-03-16 14:47 ` [tip:core/urgent] rcu: Fix tracepoints & lockdep false positive tip-bot for Lai Jiangshan
  0 siblings, 2 replies; 4+ messages in thread
From: Lai Jiangshan @ 2010-03-16  9:00 UTC (permalink / raw)
  To: Ingo Molnar, Paul E. McKenney, Mathieu Desnoyers, LKML

tracepoint.h use rcu_dereference(), it triggers this warning:

[    0.701161] ===================================================
[    0.702211] [ INFO: suspicious rcu_dereference_check() usage. ]
[    0.702716] ---------------------------------------------------
[    0.703203] include/trace/events/workqueue.h:68 invoked rcu_dereference_check() without protection!
[    0.703971]
[    0.703990] other info that might help us debug this:
[    0.703993]
[    0.705590]
[    0.705604] rcu_scheduler_active = 1, debug_locks = 0
[    0.706712] 1 lock held by swapper/1:
[    0.707229]  #0:  (cpu_add_remove_lock){+.+.+.}, at: [<c0142f54>] cpu_maps_update_begin+0x14/0x20
[    0.710097]
[    0.710106] stack backtrace:
[    0.712602] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-tip-01613-g72662bb #168
[    0.713231] Call Trace:
[    0.713997]  [<c017174d>] lockdep_rcu_dereference+0x9d/0xb0
[    0.714746]  [<c015a117>] create_workqueue_thread+0x107/0x110
[    0.715353]  [<c015aee0>] ? worker_thread+0x0/0x340
[    0.715845]  [<c015a8e8>] __create_workqueue_key+0x138/0x240
[    0.716427]  [<c0142f92>] ? cpu_maps_update_done+0x12/0x20
[    0.717012]  [<c086b12f>] init_workqueues+0x6f/0x80
[    0.717530]  [<c08576d2>] kernel_init+0x102/0x1f0
[    0.717570]  [<c08575d0>] ? kernel_init+0x0/0x1f0
[    0.718944]  [<c01030fa>] kernel_thread_helper+0x6/0x10

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index f59604e..78b4bd3 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -49,7 +49,7 @@ struct tracepoint {
 		void **it_func;						\
 									\
 		rcu_read_lock_sched_notrace();				\
-		it_func = rcu_dereference((tp)->funcs);			\
+		it_func = rcu_dereference_sched((tp)->funcs);		\
 		if (it_func) {						\
 			do {						\
 				((void(*)(proto))(*it_func))(args);	\


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -tip] rcu: fix lockdep for tracepoint
  2010-03-16  9:00 [PATCH -tip] rcu: fix lockdep for tracepoint Lai Jiangshan
@ 2010-03-16 13:08 ` Mathieu Desnoyers
  2010-03-16 13:31   ` Paul E. McKenney
  2010-03-16 14:47 ` [tip:core/urgent] rcu: Fix tracepoints & lockdep false positive tip-bot for Lai Jiangshan
  1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-03-16 13:08 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, Paul E. McKenney, LKML

* Lai Jiangshan (laijs@cn.fujitsu.com) wrote:
> tracepoint.h use rcu_dereference(), it triggers this warning:
> 
> [    0.701161] ===================================================
> [    0.702211] [ INFO: suspicious rcu_dereference_check() usage. ]
> [    0.702716] ---------------------------------------------------
> [    0.703203] include/trace/events/workqueue.h:68 invoked rcu_dereference_check() without protection!
> [    0.703971]
> [    0.703990] other info that might help us debug this:
> [    0.703993]
> [    0.705590]
> [    0.705604] rcu_scheduler_active = 1, debug_locks = 0
> [    0.706712] 1 lock held by swapper/1:
> [    0.707229]  #0:  (cpu_add_remove_lock){+.+.+.}, at: [<c0142f54>] cpu_maps_update_begin+0x14/0x20
> [    0.710097]
> [    0.710106] stack backtrace:
> [    0.712602] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-tip-01613-g72662bb #168
> [    0.713231] Call Trace:
> [    0.713997]  [<c017174d>] lockdep_rcu_dereference+0x9d/0xb0
> [    0.714746]  [<c015a117>] create_workqueue_thread+0x107/0x110
> [    0.715353]  [<c015aee0>] ? worker_thread+0x0/0x340
> [    0.715845]  [<c015a8e8>] __create_workqueue_key+0x138/0x240
> [    0.716427]  [<c0142f92>] ? cpu_maps_update_done+0x12/0x20
> [    0.717012]  [<c086b12f>] init_workqueues+0x6f/0x80
> [    0.717530]  [<c08576d2>] kernel_init+0x102/0x1f0
> [    0.717570]  [<c08575d0>] ? kernel_init+0x0/0x1f0
> [    0.718944]  [<c01030fa>] kernel_thread_helper+0x6/0x10
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks Lai,

Mathieu

> ---
> diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
> index f59604e..78b4bd3 100644
> --- a/include/linux/tracepoint.h
> +++ b/include/linux/tracepoint.h
> @@ -49,7 +49,7 @@ struct tracepoint {
>  		void **it_func;						\
>  									\
>  		rcu_read_lock_sched_notrace();				\
> -		it_func = rcu_dereference((tp)->funcs);			\
> +		it_func = rcu_dereference_sched((tp)->funcs);		\
>  		if (it_func) {						\
>  			do {						\
>  				((void(*)(proto))(*it_func))(args);	\
> 

-- 
Mathieu Desnoyers
Operating System Efficiency Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -tip] rcu: fix lockdep for tracepoint
  2010-03-16 13:08 ` Mathieu Desnoyers
@ 2010-03-16 13:31   ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2010-03-16 13:31 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Lai Jiangshan, Ingo Molnar, LKML

On Tue, Mar 16, 2010 at 09:08:14AM -0400, Mathieu Desnoyers wrote:
> * Lai Jiangshan (laijs@cn.fujitsu.com) wrote:
> > tracepoint.h use rcu_dereference(), it triggers this warning:
> > 
> > [    0.701161] ===================================================
> > [    0.702211] [ INFO: suspicious rcu_dereference_check() usage. ]
> > [    0.702716] ---------------------------------------------------
> > [    0.703203] include/trace/events/workqueue.h:68 invoked rcu_dereference_check() without protection!
> > [    0.703971]
> > [    0.703990] other info that might help us debug this:
> > [    0.703993]
> > [    0.705590]
> > [    0.705604] rcu_scheduler_active = 1, debug_locks = 0
> > [    0.706712] 1 lock held by swapper/1:
> > [    0.707229]  #0:  (cpu_add_remove_lock){+.+.+.}, at: [<c0142f54>] cpu_maps_update_begin+0x14/0x20
> > [    0.710097]
> > [    0.710106] stack backtrace:
> > [    0.712602] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-tip-01613-g72662bb #168
> > [    0.713231] Call Trace:
> > [    0.713997]  [<c017174d>] lockdep_rcu_dereference+0x9d/0xb0
> > [    0.714746]  [<c015a117>] create_workqueue_thread+0x107/0x110
> > [    0.715353]  [<c015aee0>] ? worker_thread+0x0/0x340
> > [    0.715845]  [<c015a8e8>] __create_workqueue_key+0x138/0x240
> > [    0.716427]  [<c0142f92>] ? cpu_maps_update_done+0x12/0x20
> > [    0.717012]  [<c086b12f>] init_workqueues+0x6f/0x80
> > [    0.717530]  [<c08576d2>] kernel_init+0x102/0x1f0
> > [    0.717570]  [<c08575d0>] ? kernel_init+0x0/0x1f0
> > [    0.718944]  [<c01030fa>] kernel_thread_helper+0x6/0x10
> > 
> > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> 
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> 
> Thanks Lai,

Me too!

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Mathieu
> 
> > ---
> > diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
> > index f59604e..78b4bd3 100644
> > --- a/include/linux/tracepoint.h
> > +++ b/include/linux/tracepoint.h
> > @@ -49,7 +49,7 @@ struct tracepoint {
> >  		void **it_func;						\
> >  									\
> >  		rcu_read_lock_sched_notrace();				\
> > -		it_func = rcu_dereference((tp)->funcs);			\
> > +		it_func = rcu_dereference_sched((tp)->funcs);		\
> >  		if (it_func) {						\
> >  			do {						\
> >  				((void(*)(proto))(*it_func))(args);	\
> > 
> 
> -- 
> Mathieu Desnoyers
> Operating System Efficiency Consultant
> EfficiOS Inc.
> http://www.efficios.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:core/urgent] rcu: Fix tracepoints & lockdep false positive
  2010-03-16  9:00 [PATCH -tip] rcu: fix lockdep for tracepoint Lai Jiangshan
  2010-03-16 13:08 ` Mathieu Desnoyers
@ 2010-03-16 14:47 ` tip-bot for Lai Jiangshan
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Lai Jiangshan @ 2010-03-16 14:47 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mathieu.desnoyers, hpa, mingo, paulmck, fweisbec,
	rostedt, tglx, laijs, mingo

Commit-ID:  7f5b774275df8c76a959eae7488128b637fcbfc8
Gitweb:     http://git.kernel.org/tip/7f5b774275df8c76a959eae7488128b637fcbfc8
Author:     Lai Jiangshan <laijs@cn.fujitsu.com>
AuthorDate: Tue, 16 Mar 2010 17:00:29 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 16 Mar 2010 10:10:40 +0100

rcu: Fix tracepoints & lockdep false positive

tracepoint.h uses rcu_dereference(), which triggers this warning:

[    0.701161] ===================================================
[    0.702211] [ INFO: suspicious rcu_dereference_check() usage. ]
[    0.702716] ---------------------------------------------------
[    0.703203] include/trace/events/workqueue.h:68 invoked rcu_dereference_check() without protection!
[    0.703971] [ 0.703990] other info that might help us debug this:
[    0.703993]
[    0.705590]
[    0.705604] rcu_scheduler_active = 1, debug_locks = 0
[    0.706712] 1 lock held by swapper/1:
[    0.707229]  #0:  (cpu_add_remove_lock){+.+.+.}, at: [<c0142f54>] cpu_maps_update_begin+0x14/0x20
[    0.710097]
[    0.710106] stack backtrace:
[    0.712602] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-tip-01613-g72662bb #168
[    0.713231] Call Trace:
[    0.713997]  [<c017174d>] lockdep_rcu_dereference+0x9d/0xb0
[    0.714746]  [<c015a117>] create_workqueue_thread+0x107/0x110
[    0.715353]  [<c015aee0>] ? worker_thread+0x0/0x340
[    0.715845]  [<c015a8e8>] __create_workqueue_key+0x138/0x240
[    0.716427]  [<c0142f92>] ? cpu_maps_update_done+0x12/0x20
[    0.717012]  [<c086b12f>] init_workqueues+0x6f/0x80
[    0.717530]  [<c08576d2>] kernel_init+0x102/0x1f0
[    0.717570]  [<c08575d0>] ? kernel_init+0x0/0x1f0
[    0.718944]  [<c01030fa>] kernel_thread_helper+0x6/0x10

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4B9F48AD.4000404@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/tracepoint.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index f59604e..78b4bd3 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -49,7 +49,7 @@ struct tracepoint {
 		void **it_func;						\
 									\
 		rcu_read_lock_sched_notrace();				\
-		it_func = rcu_dereference((tp)->funcs);			\
+		it_func = rcu_dereference_sched((tp)->funcs);		\
 		if (it_func) {						\
 			do {						\
 				((void(*)(proto))(*it_func))(args);	\

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-16 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16  9:00 [PATCH -tip] rcu: fix lockdep for tracepoint Lai Jiangshan
2010-03-16 13:08 ` Mathieu Desnoyers
2010-03-16 13:31   ` Paul E. McKenney
2010-03-16 14:47 ` [tip:core/urgent] rcu: Fix tracepoints & lockdep false positive tip-bot for Lai Jiangshan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.