From: Mathieu Desnoyers Date: Thu, 29 Sep 2011 21:13:48 +0000 (-0400) Subject: urcu call_rcu: Use RCU read-side protection for per-cpu call_rcu data X-Git-Tag: v0.6.5~3 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=618b25958fec4d76310f0d9c59e42128e73a8719;hp=618b25958fec4d76310f0d9c59e42128e73a8719 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 ---