diff options
| author | Paul E. McKenney <[email protected]> | 2025-02-06 10:15:09 +0000 |
|---|---|---|
| committer | Boqun Feng <[email protected]> | 2025-03-05 02:44:29 +0000 |
| commit | 59bed79ffdbc26af3dfba3c6453a4356c9fd6b6f (patch) | |
| tree | 8c38344a9f118902b53ff476096eecddad79a611 /scripts/rustdoc_test_gen.rs | |
| parent | rcu/nocb: Print segment lengths in show_rcu_nocb_gp_state() (diff) | |
| download | kernel-59bed79ffdbc26af3dfba3c6453a4356c9fd6b6f.tar.gz kernel-59bed79ffdbc26af3dfba3c6453a4356c9fd6b6f.zip | |
context_tracking: Make RCU watch ct_kernel_exit_state() warning
The WARN_ON_ONCE() in ct_kernel_exit_state() follows the call to
ct_state_inc(), which means that RCU is not watching this WARN_ON_ONCE().
This can (and does) result in extraneous lockdep warnings when this
WARN_ON_ONCE() triggers. These extraneous warnings are the opposite
of helpful.
Therefore, invert the WARN_ON_ONCE() condition and move it before the
call to ct_state_inc(). This does mean that the ct_state_inc() return
value can no longer be used in the WARN_ON_ONCE() condition, so discard
this return value and instead use a call to rcu_is_watching_curr_cpu().
This call is executed only in CONFIG_RCU_EQS_DEBUG=y kernels, so there
is no added overhead in production use.
[Boqun: Add the subsystem tag in the title]
Reported-by: Breno Leitao <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Reviewed-by: Frederic Weisbecker <[email protected]>
Link: https://lore.kernel.org/r/bd911cd9-1fe9-447c-85e0-ea811a1dc896@paulmck-laptop
Signed-off-by: Boqun Feng <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_gen.rs')
0 files changed, 0 insertions, 0 deletions
