Re: [PATCH] x86/nmi: Make register_nmi_handler() more robust

From: Thomas Gleixner
Date: Sun May 15 2022 - 07:42:42 EST


On Fri, May 13 2022 at 13:10, Thomas Gleixner wrote:
> @@ -157,7 +157,7 @@ int __register_nmi_handler(unsigned int
> struct nmi_desc *desc = nmi_to_desc(type);
> unsigned long flags;
>
> - if (!action->handler)
> + if (WARN_ON_ONCE(action->handler || !list_empty(&action->list)))

Bah. That should obviously be !action->handler. Let me send V2