Skip to content

Commit 4d2f862

Browse files
committed
doc: Emphasize the need for explicit RCU read-side markers
This commit updates checklist.rst to emphasize the need for explicit markers for RCU read-side critical sections. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 568035b commit 4d2f862

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/RCU/checklist.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ over a rather long period of time, but improvements are always welcome!
6666
As a rough rule of thumb, any dereference of an RCU-protected
6767
pointer must be covered by rcu_read_lock(), rcu_read_lock_bh(),
6868
rcu_read_lock_sched(), or by the appropriate update-side lock.
69-
Disabling of preemption can serve as rcu_read_lock_sched(), but
70-
is less readable and prevents lockdep from detecting locking issues.
69+
Explicit disabling of preemption (preempt_disable(), for example)
70+
can serve as rcu_read_lock_sched(), but is less readable and
71+
prevents lockdep from detecting locking issues.
72+
73+
Please not that you *cannot* rely on code known to be built
74+
only in non-preemptible kernels. Such code can and will break,
75+
especially in kernels built with CONFIG_PREEMPT_COUNT=y.
7176

7277
Letting RCU-protected pointers "leak" out of an RCU read-side
7378
critical section is every bit as bad as letting them leak out

0 commit comments

Comments
 (0)