srcu: Force full grace-period ordering
commitd85b62f18d543c663cbdd6061054efeb9e66cee7
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 28 Nov 2016 20:08:49 +0000 (28 12:08 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 25 Jan 2017 20:54:22 +0000 (25 12:54 -0800)
treef057b276302012d5f62a6c0a2727e0b334e26866
parentf2c4689640e9a34bc45c013032185ed4ce47e7ff
srcu: Force full grace-period ordering

If a process invokes synchronize_srcu(), is delayed just the right amount
of time, and thus does not sleep when waiting for the grace period to
complete, there is no ordering between the end of the grace period and
the code following the synchronize_srcu().  Similarly, there can be a
lack of ordering between the end of the SRCU grace period and callback
invocation.

This commit adds the necessary ordering.

Reported-by: Lance Roy <ldr709@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Further smp_mb() adjustment per email with Lance Roy. ]
include/linux/rcupdate.h
kernel/rcu/srcu.c
kernel/rcu/tree.h