urcu call_rcu: Use RCU read-side protection for per-cpu call_rcu data
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Sep 2011 21:13:48 +0000 (17:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Sep 2011 21:13:48 +0000 (17:13 -0400)
commit618b25958fec4d76310f0d9c59e42128e73a8719
tree4aefe1eabb1f11a2fc36c78c79b4653a24f661fa
parent60af049d5e1d17e7ffdfd139bb486bd969c6a76c
urcu call_rcu: Use RCU read-side protection for per-cpu call_rcu data

A concurrent get_cpu_call_rcu_data(), called by get_call_rcu_data(),
could dereference this pointer without holding any mutex. So this
situation would happen if we have a concurrent call_rcu() executing
while we do the create_all_cpu_call_rcu_data().

I think we would need to put a rcu_dereference() around
per_cpu_call_rcu_data read within get_cpu_call_rcu_data() too.
per_cpu_call_rcu_data should be done with rcu_set_pointer.

Also, a rcu read-side critical section would be required around any
usage of per_cpu_call_rcu_data, and the action of tearing down the
per-cpu data would require to wait for a quiescent state. So we would
basically require that the call_rcu users need to be registered as
RCU reader threads.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp.c
urcu-call-rcu-impl.h
urcu-call-rcu.h
urcu-qsbr.c
urcu.c
This page took 0.025912 seconds and 4 git commands to generate.