diff options
| author | Ryo Takakura <[email protected]> | 2025-03-21 14:33:22 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-03-25 09:46:44 +0000 |
| commit | 61c39d8c83e2077f33e0a2c8980a76a7f323f0ce (patch) | |
| tree | b4177d29e64dffe1040a02f90763f4ec6011dfa0 /Documentation/rust/coding-guidelines.rst | |
| parent | x86/split_lock: Simplify reenabling (diff) | |
| download | kernel-61c39d8c83e2077f33e0a2c8980a76a7f323f0ce.tar.gz kernel-61c39d8c83e2077f33e0a2c8980a76a7f323f0ce.zip | |
lockdep: Fix wait context check on softirq for PREEMPT_RT
Since:
0c1d7a2c2d32 ("lockdep: Remove softirq accounting on PREEMPT_RT.")
the wait context test for mutex usage within "in softirq context" fails
as it references @softirq_context:
| wait context tests |
--------------------------------------------------------------------------
| rcu | raw | spin |mutex |
--------------------------------------------------------------------------
in hardirq context: ok | ok | ok | ok |
in hardirq context (not threaded): ok | ok | ok | ok |
in softirq context: ok | ok | ok |FAILED|
As a fix, add lockdep map for BH disabled section. This fixes the
issue by letting us catch cases when local_bh_disable() gets called
with preemption disabled where local_lock doesn't get acquired.
In the case of "in softirq context" selftest, local_bh_disable() was
being called with preemption disable as it's early in the boot.
[ boqun: Move the lockdep annotations into __local_bh_*() to avoid false
positives because of unpaired local_bh_disable() reported by
Borislav Petkov and Peter Zijlstra, and make bh_lock_map
only exist for PREEMPT_RT. ]
[ mingo: Restored authorship and improved the bh_lock_map definition. ]
Signed-off-by: Ryo Takakura <[email protected]>
Signed-off-by: Boqun Feng <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'Documentation/rust/coding-guidelines.rst')
0 files changed, 0 insertions, 0 deletions
