Paul E. McKenney c6ebcbb60c rcu: Fix bug in rcu_barrier() torture test
The child threads in the rcu_torture_barrier_cbs() are improperly
synchronized, which can cause the rcu_barrier() tests to hang.  The
failure mode is as follows:

1.	CPU 0 running in rcu_torture_barrier() sets barrier_cbs_count
    	to n_barrier_cbs.

2.	CPU 1 running in rcu_torture_barrier_cbs() wakes up, posts
    	its RCU callback, and atomically decrements barrier_cbs_count.
    	Because barrier_cbs_count is not zero, it does not do the wake_up().

3.	CPU 2 running in rcu_torture_barrier_cbs() wakes up, but
    	finds that barrier_cbs_count is not equal to n_barrier_cbs,
    	and so returns to sleep.

4.	The value of barrier_cbs_count therefore never reaches zero,
    	which causes the test to hang.

This commit therefore uses a phase variable to coordinate the test,
preventing this scenario from occurring.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2012-07-02 12:34:03 -07:00
..
2012-04-04 17:26:08 -07:00
2011-07-26 16:49:45 -07:00
2012-05-21 23:52:30 -04:00
2012-05-31 17:49:27 -07:00
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2012-05-31 17:49:32 -07:00
2012-05-31 17:49:28 -07:00
2012-05-29 23:28:41 -04:00
2012-03-29 19:52:46 +08:00
2012-06-30 15:56:40 -07:00
2012-03-28 18:30:03 +01:00
2012-06-01 12:58:52 -04:00
2012-05-08 12:35:06 +02:00
2012-05-31 17:49:32 -07:00
2011-09-19 17:04:37 -07:00
2012-03-15 18:17:55 -07:00
2012-05-19 15:44:40 -06:00