diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-04-13 00:16:50 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-06-08 17:25:23 +0200 |
commit | 881ec9d209d5371c21db89ca1bb19afd3fcadab3 (patch) | |
tree | 04f275f3a297386ecc5a148f97dc4235d162c742 /Documentation/namespaces | |
parent | rcutorture: Update test scenarios based on new Kconfig dependencies (diff) | |
download | linux-881ec9d209d5371c21db89ca1bb19afd3fcadab3.tar.xz linux-881ec9d209d5371c21db89ca1bb19afd3fcadab3.zip |
srcu: Eliminate possibility of destructive counter overflow
Earlier versions of Tree SRCU were subject to a counter overflow bug that
could theoretically result in too-short grace periods. This commit
eliminates this problem by adding an update-side memory barrier.
The short explanation is that if the updater sums the unlock counts
too late to see a given __srcu_read_unlock() increment, that CPU's
next __srcu_read_lock() must see the new value of ->srcu_idx, thus
incrementing the other bank of counters. This eliminates the possibility
of destructive counter overflow as long as the srcu_read_lock() nesting
level does not exceed floor(ULONG_MAX/NR_CPUS/2), which should be an
eminently reasonable nesting limit, especially on 64-bit systems.
Reported-by: Lance Roy <ldr709@gmail.com>
Suggested-by: Lance Roy <ldr709@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/namespaces')
0 files changed, 0 insertions, 0 deletions