Commit 61c39d8
lockdep: Fix wait context check on softirq for PREEMPT_RT
Since:
0c1d7a2 ("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]1 parent 0e1ff67 commit 61c39d8
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
| |||
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| 163 | + | |
| 164 | + | |
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| |||
211 | 225 | | |
212 | 226 | | |
213 | 227 | | |
| 228 | + | |
| 229 | + | |
214 | 230 | | |
215 | 231 | | |
216 | 232 | | |
| |||
261 | 277 | | |
262 | 278 | | |
263 | 279 | | |
| 280 | + | |
| 281 | + | |
264 | 282 | | |
265 | 283 | | |
266 | 284 | | |
| |||
0 commit comments