]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Improve comments describing RCU read-side critical sections
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 29 Apr 2021 18:18:01 +0000 (11:18 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 13 May 2021 16:13:23 +0000 (09:13 -0700)
commit25187e8a9887f3d7f46e7575211c8bb6935d8e46
tree7e69c09686f67289eacdabcd4f25e8471230c93e
parent7ac7f6b548359ab26a4702219024baf00550c9fc
rcu: Improve comments describing RCU read-side critical sections

There are a number of places that call out the fact that preempt-disable
regions of code now act as RCU read-side critical sections, where
preempt-disable regions of code include irq-disable regions of code,
bh-disable regions of code, hardirq handlers, and NMI handlers.  However,
someone relying solely on (for example) the call_rcu() header comment
might well have no idea that preempt-disable regions of code have RCU
semantics.

This commit therefore updates the header comments for
call_rcu(), synchronize_rcu(), rcu_dereference_bh_check(), and
rcu_dereference_sched_check() to call out these new(ish) forms of RCU
readers.

Reported-by: Michel Lespinasse <michel@lespinasse.org>
[ paulmck: Apply Matthew Wilcox and Michel Lespinasse feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/rcupdate.h
kernel/rcu/tree.c