diff options
| author | Wen Yang <wen.yang@linux.dev> | 2026-09-15 03:13:34 +0800 |
|---|---|---|
| committer | Gabriele Monaco <gmonaco@redhat.com> | 2026-10-01 13:59:36 +0200 |
| commit | 39ccedfd9e55c95e440c26611a1db750b92b83bf (patch) | |
| tree | fb7e18f1feb00cf29ea08f6644526361583aa187 /rust/kernel/alloc | |
| parent | fd73f4a6659897191fa0d40695fe370925dd3780 (diff) | |
rv: Use LD_WAIT_SPIN as the reactor lockdep wait type
rv_react() overrides the lockdep wait type to LD_WAIT_FREE to enforce
that reactor callbacks take no locks. But callbacks run in the context
of the triggering tracepoint, which can be preemptible task context on
any kernel. A timer interrupt firing during the callback makes the
interrupt-exit path schedule and take rq->__lock (LD_WAIT_SPIN) while
the LD_WAIT_FREE override is still held, producing a spurious
"Invalid wait context" warning:
[ BUG: Invalid wait context ]
context-{5:5}
1 lock held by kunit_try_catch/209:
#0: (rv_react_map-wait-type-override){+.+.}-{1:1}
kunit_try_catch/209 is trying to lock:
ffff8a743ed3e8a0 (&rq->__lock){-...}-{2:2}
Use LD_WAIT_SPIN instead of LD_WAIT_FREE, which causes false-positive
warnings in preemptible contexts due to scheduler preemption taking
rq->__lock.
Fixes: 69d8895cb9a9 ("rv: Add explicit lockdep context for reactors")
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Wen Yang <wen.yang@linux.dev>
Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/5586dd00789a0f904cc299cd8889744b8c6f8dc9.1789412799.git.wen.yang@linux.dev
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
