Re: [PATCH 1/3] rv/reactors: fix lockdep "Invalid wait context" in rv_react()

From: Nam Cao

Date: Wed Jun 17 2026 - 11:58:25 EST


wen.yang@xxxxxxxxx writes:
> void rv_react(struct rv_monitor *monitor, const char *msg, ...)
> {
> - static DEFINE_WAIT_OVERRIDE_MAP(rv_react_map, LD_WAIT_FREE);
> +#ifdef CONFIG_LOCKDEP
> + static struct lockdep_map rv_react_map = {
> + .name = "rv_react",
> + .wait_type_outer = LD_WAIT_FREE,
> + .wait_type_inner = LD_WAIT_SPIN,
> + };
> +#endif
> va_list args;
>
> if (!rv_reacting_on() || !monitor->react)

>From my limited understanding of lockdep, this looks fine to me. It now
will not warn us if reactor takes a raw_spin_lock, but I think it's fine.

But I would wait for Thomas's thought on this. He will be back next
week.

Nam