Prev: [PATCH] net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()
Next: fbdev: section cleanup in efifb
From: Mathieu Desnoyers on 29 Mar 2010 11:20 Complain if activation receives a non-initialized object on the stack. [This patch applies after "tree/tiny rcu: Add debug RCU head objects (v5)"] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> CC: David S. Miller <davem(a)davemloft.net> CC: "Paul E. McKenney" <paulmck(a)linux.vnet.ibm.com> CC: akpm(a)linux-foundation.org CC: mingo(a)elte.hu CC: laijs(a)cn.fujitsu.com CC: dipankar(a)in.ibm.com CC: josh(a)joshtriplett.org CC: dvhltc(a)us.ibm.com CC: niv(a)us.ibm.com CC: tglx(a)linutronix.de CC: peterz(a)infradead.org CC: rostedt(a)goodmis.org CC: Valdis.Kletnieks(a)vt.edu CC: dhowells(a)redhat.com CC: eric.dumazet(a)gmail.com CC: Alexey Dobriyan <adobriyan(a)gmail.com> --- kernel/rcupdate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) Index: linux.trees.git/kernel/rcupdate.c =================================================================== --- linux.trees.git.orig/kernel/rcupdate.c 2010-03-29 11:05:35.000000000 -0400 +++ linux.trees.git/kernel/rcupdate.c 2010-03-29 11:06:23.000000000 -0400 @@ -179,8 +179,12 @@ static int rcuhead_fixup_activate(void * * This is not really a fixup. We just make sure that it is * tracked in the object tracker. */ - debug_object_init(head, &rcuhead_debug_descr); - debug_object_activate(head, &rcuhead_debug_descr); + if (!object_is_on_stack(head)) { + debug_object_init(head, &rcuhead_debug_descr); + debug_object_activate(head, &rcuhead_debug_descr); + return 0; + } + WARN_ON_ONCE(1); return 0; case ODEBUG_STATE_ACTIVE: -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |