1
0
Fork 0
alistair23-linux/kernel/rcu
Paul E. McKenney 74de6960c9 rcu: Provide functions for determining if call_rcu() has been invoked
This commit adds rcu_head_init() and rcu_head_after_call_rcu() functions
to help RCU users detect when another CPU has passed the specified
rcu_head structure and function to call_rcu().  The rcu_head_init()
should be invoked before making the structure visible to RCU readers,
and then the rcu_head_after_call_rcu() may be invoked from within
an RCU read-side critical section on an rcu_head structure that
was obtained during a traversal of the data structure in question.
The rcu_head_after_call_rcu() function will return true if the rcu_head
structure has already been passed (with the specified function) to
call_rcu(), otherwise it will return false.

If rcu_head_init() has not been invoked on the rcu_head structure
or if the rcu_head (AKA callback) has already been invoked, then
rcu_head_after_call_rcu() will do WARN_ON_ONCE().

Reported-by: NeilBrown <neilb@suse.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Apply neilb naming feedback. ]
2018-08-30 16:03:42 -07:00
..
Kconfig rcu: Clean up flavor-related definitions and comments in Kconfig 2018-08-30 16:03:32 -07:00
Kconfig.debug rcu: Move RCU debug Kconfig options to kernel/rcu 2017-06-08 18:52:44 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rcu.h rcu: Provide functions for determining if call_rcu() has been invoked 2018-08-30 16:03:42 -07:00
rcu_segcblist.c rcu: Simplify and inline cpu_needs_another_gp() 2018-05-15 10:30:59 -07:00
rcu_segcblist.h rcu: Simplify and inline cpu_needs_another_gp() 2018-05-15 10:30:59 -07:00
rcuperf.c rcuperf: Remove the "rcu_bh" and "sched" torture types 2018-08-30 16:03:30 -07:00
rcutorture.c rcutorture: Dump reader protection sequence if failures or close calls 2018-08-30 16:03:40 -07:00
srcutiny.c sched/swait: Rename to exclusive 2018-06-20 11:35:56 +02:00
srcutree.c rcu: Clean up flavor-related definitions and comments in srcutree.h 2018-08-30 16:03:34 -07:00
sync.c doc: Fix various RCU docbook comment-header problems 2017-10-19 22:26:11 -04:00
tiny.c rcu: Motivate Tiny RCU forward progress 2018-08-30 16:03:41 -07:00
tree.c rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure 2018-08-30 16:03:42 -07:00
tree.h rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure 2018-08-30 16:03:42 -07:00
tree_exp.h rcu: Clean up flavor-related definitions and comments in tree_exp.h 2018-08-30 16:03:35 -07:00
tree_plugin.h rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure 2018-08-30 16:03:42 -07:00
update.c rcu: Clean up flavor-related definitions and comments in update.c 2018-08-30 16:03:36 -07:00