]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rcu: Don't destroy rcu_torture_boost() callback until it is done
authorPaul E. McKenney <paul.mckenney@linaro.org>
Tue, 21 Jun 2011 08:48:03 +0000 (01:48 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 10 Aug 2011 02:28:29 +0000 (19:28 -0700)
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 <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutorture.c

index e0f39ea27d63e45fb001b442139c579648bd0488..1194d6c164671f28df0d217580fb5f7ef15e3c2b 100644 (file)
@@ -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;
 }