From: Paul E. McKenney Date: Tue, 21 Jun 2011 08:48:03 +0000 (-0700) Subject: rcu: Don't destroy rcu_torture_boost() callback until it is done X-Git-Tag: next-20110930~19^2~38 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d68197c05201d8edc70d58bd1d5dad05d8455e8;p=karo-tx-linux.git rcu: Don't destroy rcu_torture_boost() callback until it is done The rcu_torture_boost() cleanup code destroyed debug-objects state before waiting for the last RCU callback to be invoked, resulting in rare but very real debug-objects warnings. Move the destruction to after the waiting to fix this problem. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 75fca518888c..6a30ea3f1d82 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -796,11 +796,11 @@ checkwait: rcu_stutter_wait("rcu_torture_boost"); /* Clean up and exit. */ VERBOSE_PRINTK_STRING("rcu_torture_boost task stopping"); - destroy_rcu_head_on_stack(&rbi.rcu); rcutorture_shutdown_absorb("rcu_torture_boost"); while (!kthread_should_stop() || rbi.inflight) schedule_timeout_uninterruptible(1); smp_mb(); /* order accesses to ->inflight before stack-frame death. */ + destroy_rcu_head_on_stack(&rbi.rcu); return 0; }