* [dovetail][PATCH] lockdep: dovetail: fix unbalanced hard_cond_local_irq_restore
@ 2026-11-27 13:56 Jan Kiszka
2026-11-28 10:53 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2026-11-27 13:56 UTC (permalink / raw)
To: Philippe Gerum, Xenomai
From: Jan Kiszka <jan.kiszka@siemens.com>
After the skip_checks block comes a hard_cond_local_irq_restore() - but
we were not initializing flags when jumping from here.
We are in NMI context here, thus IRQs disabling is technically unneeded
but a) symmetric to the hard_cond_local_irq_restore and b) truly gone
when IRQ_PIPELINE is off.
Reported-by: OpenCode:Opus-5.5
Fixes: f9acdddb8afc, 5.15 ("irq_pipeline: lockdep: fix irq state causing deadlock")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
It took backports from 7.3 down to 5.15, each reviewed by the same AI, to
finally make it spot this.
kernel/locking/lockdep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 08bb0173dad77..4d91327a2a6ce 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4535,6 +4535,7 @@ void noinstr lockdep_hardirqs_on(unsigned long ip)
* - hardware state check, because above;
* - chain_key check, see lockdep_hardirqs_on_prepare().
*/
+ flags = hard_cond_local_irq_save();
goto skip_checks;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [dovetail][PATCH] lockdep: dovetail: fix unbalanced hard_cond_local_irq_restore
2026-11-27 13:56 [dovetail][PATCH] lockdep: dovetail: fix unbalanced hard_cond_local_irq_restore Jan Kiszka
@ 2026-11-28 10:53 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2026-11-28 10:53 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
Jan Kiszka <jan.kiszka@siemens.com> writes:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> After the skip_checks block comes a hard_cond_local_irq_restore() - but
> we were not initializing flags when jumping from here.
>
> We are in NMI context here, thus IRQs disabling is technically unneeded
> but a) symmetric to the hard_cond_local_irq_restore and b) truly gone
> when IRQ_PIPELINE is off.
>
> Reported-by: OpenCode:Opus-5.5
> Fixes: f9acdddb8afc, 5.15 ("irq_pipeline: lockdep: fix irq state causing deadlock")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> It took backports from 7.3 down to 5.15, each reviewed by the same AI, to
> finally make it spot this.
>
> kernel/locking/lockdep.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 08bb0173dad77..4d91327a2a6ce 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -4535,6 +4535,7 @@ void noinstr lockdep_hardirqs_on(unsigned long ip)
> * - hardware state check, because above;
> * - chain_key check, see lockdep_hardirqs_on_prepare().
> */
> + flags = hard_cond_local_irq_save();
> goto skip_checks;
> }
Merged, thanks.
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-28 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 13:56 [dovetail][PATCH] lockdep: dovetail: fix unbalanced hard_cond_local_irq_restore Jan Kiszka
2026-11-28 10:53 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.