[PATCH] Fix bug in RCU torture test
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / rcutorture.c
index 88c28d476550d004fe3232ab284d54473f5885a9..49fbbeff201ce7c27c72e7077b2555c31f478040 100644 (file)
@@ -409,9 +409,8 @@ rcu_torture_cleanup(void)
        stats_task = NULL;
 
        /* Wait for all RCU callbacks to fire.  */
+       rcu_barrier();
 
-       for (i = 0; i < RCU_TORTURE_PIPE_LEN; i++)
-               synchronize_rcu();
        rcu_torture_stats_print();  /* -After- the stats thread is stopped! */
        printk(KERN_ALERT TORTURE_FLAG
               "--- End of test: %s\n",