linux/kernel/rcu
Paul E. McKenney 881ec9d209 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>
2017-06-08 08:25:23 -07:00
..
Makefile rcu: Separately compile large rcu_segcblist functions 2017-05-02 07:21:02 -07:00
rcu_segcblist.c rcu: Separately compile large rcu_segcblist functions 2017-05-02 07:21:02 -07:00
rcu_segcblist.h rcu: Open-code the rcu_cblist_n_lazy_cbs() function 2017-05-02 09:22:48 -07:00
rcu.h srcu: Merge ->srcu_state into ->srcu_gp_seq 2017-04-18 11:38:22 -07:00
rcuperf.c sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
rcutorture.c srcu: Make rcutorture writer stalls print SRCU GP state 2017-04-26 11:23:28 -07:00
srcu.c srcu: Allow use of Classic SRCU from both process and interrupt context 2017-06-08 08:25:19 -07:00
srcutiny.c srcu: Allow use of Tiny/Tree SRCU from both process and interrupt context 2017-06-08 08:24:26 -07:00
srcutree.c srcu: Eliminate possibility of destructive counter overflow 2017-06-08 08:25:23 -07:00
sync.c locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() 2016-08-18 15:36:59 +02:00
tiny_plugin.h srcu: Allow SRCU to access rcu_scheduler_active 2017-04-18 11:38:18 -07:00
tiny.c rcu: Semicolon inside RCU_TRACE() for Tiny RCU 2017-04-18 11:38:17 -07:00
tree_exp.h srcu: Improve rcu_seq grace-period-counter abstraction 2017-04-18 11:38:21 -07:00
tree_plugin.h rcu: Open-code the rcu_cblist_n_lazy_cbs() function 2017-05-02 09:22:48 -07:00
tree_trace.c rcu: Open-code the rcu_cblist_n_lazy_cbs() function 2017-05-02 09:22:48 -07:00
tree.c rcu: Prevent rcu_barrier() from starting needless grace periods 2017-06-08 08:25:22 -07:00
tree.h srcu: Debloat the <linux/rcu_segcblist.h> header 2017-05-02 06:29:22 -07:00
update.c rcu: Make non-preemptive schedule be Tasks RCU quiescent state 2017-04-21 05:59:27 -07:00