Commit 0cce06b
Peter Zijlstra
debugobjects,locking: Annotate debug_object_fill_pool() wait type violation
There is an explicit wait-type violation in debug_object_fill_pool()
for PREEMPT_RT=n kernels which allows them to more easily fill the
object pool and reduce the chance of allocation failures.
Lockdep's wait-type checks are designed to check the PREEMPT_RT
locking rules even for PREEMPT_RT=n kernels and object to this, so
create a lockdep annotation to allow this to stand.
Specifically, create a 'lock' type that overrides the inner wait-type
while it is held -- allowing one to temporarily raise it, such that
the violation is hidden.
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Reported-by: Qi Zheng <zhengqi.arch@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Qi Zheng <zhengqi.arch@bytedance.com>
Link: https://lkml.kernel.org/r/20230429100614.GA1489784@hirez.programming.kicks-ass.net1 parent 0af462f commit 0cce06b
File tree
4 files changed
+49
-9
lines changed- include/linux
- kernel/locking
- lib
4 files changed
+49
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
| |||
427 | 437 | | |
428 | 438 | | |
429 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
430 | 443 | | |
431 | 444 | | |
432 | 445 | | |
| |||
551 | 564 | | |
552 | 565 | | |
553 | 566 | | |
| 567 | + | |
554 | 568 | | |
555 | 569 | | |
556 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2253 | 2253 | | |
2254 | 2254 | | |
2255 | 2255 | | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
2256 | 2259 | | |
2257 | 2260 | | |
2258 | 2261 | | |
| |||
2279 | 2282 | | |
2280 | 2283 | | |
2281 | 2284 | | |
2282 | | - | |
2283 | | - | |
2284 | | - | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
2285 | 2288 | | |
2286 | | - | |
2287 | | - | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
2288 | 2293 | | |
2289 | | - | |
| 2294 | + | |
2290 | 2295 | | |
2291 | 2296 | | |
2292 | 2297 | | |
| |||
4752 | 4757 | | |
4753 | 4758 | | |
4754 | 4759 | | |
4755 | | - | |
| 4760 | + | |
| 4761 | + | |
4756 | 4762 | | |
4757 | 4763 | | |
4758 | 4764 | | |
| |||
4762 | 4768 | | |
4763 | 4769 | | |
4764 | 4770 | | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
4765 | 4779 | | |
4766 | 4780 | | |
4767 | 4781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
595 | 597 | | |
596 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
597 | 606 | | |
| 607 | + | |
| 608 | + | |
598 | 609 | | |
599 | 610 | | |
600 | 611 | | |
| |||
0 commit comments