Commit 0612ea00a010e36fde61e7b7649a1105b0ef1080
Committed by
Linus Torvalds
1 parent
be50b8342d
Exists in
master
and in
7 other branches
rcu: documentation 1Q09 update
Update the RCU documentation to call out the need for callers of primitives like call_rcu() and synchronize_rcu() to prevent subsequent RCU readers from hazard. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 12 additions and 0 deletions Side-by-side Diff
Documentation/RCU/checklist.txt
... | ... | @@ -298,4 +298,16 @@ |
298 | 298 | |
299 | 299 | Note that, rcu_assign_pointer() and rcu_dereference() relate to |
300 | 300 | SRCU just as they do to other forms of RCU. |
301 | + | |
302 | +15. The whole point of call_rcu(), synchronize_rcu(), and friends | |
303 | + is to wait until all pre-existing readers have finished before | |
304 | + carrying out some otherwise-destructive operation. It is | |
305 | + therefore critically important to -first- remove any path | |
306 | + that readers can follow that could be affected by the | |
307 | + destructive operation, and -only- -then- invoke call_rcu(), | |
308 | + synchronize_rcu(), or friends. | |
309 | + | |
310 | + Because these primitives only wait for pre-existing readers, | |
311 | + it is the caller's responsibility to guarantee safety to | |
312 | + any subsequent readers. |