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

Thomas Gleixner
2022-05-15T11:37:38Z

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