summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-12-18 12:31:27 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-01-06 11:01:15 -0800
commit41050a009640f9f330a5b916563ca7faf853a98c (patch)
treee3788995b7ae651215a39ac1e98fb2b1a81aa53c /init
parent87af9e7ff9d909e70a006ca0974466e2a1d8db0a (diff)
rcu: Fix rcu_barrier() race that could result in too-short wait
The rcu_barrier() no-callbacks check for no-CBs CPUs has race conditions. It checks a given CPU's lists of callbacks, and if all three no-CBs lists are empty, ignores that CPU. However, these three lists could potentially be empty even when callbacks are present if the check executed just as the callbacks were being moved from one list to another. It turns out that recent versions of rcutorture can spot this race. This commit plugs this hole by consolidating the per-list counts of no-CBs callbacks into a single count, which is incremented before the corresponding callback is posted and after it is invoked. Then rcu_barrier() checks this single count to reliably determine whether the corresponding CPU has no-CBs callbacks. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions