Re: [PATCH] x86/nmi: remove the irqwork from long duration nmi handler
From: Borislav Petkov
Date: Thu Jan 09 2020 - 16:02:35 EST
On Thu, Jan 09, 2020 at 09:55:51PM +0100, Thomas Gleixner wrote:
> Changbin Du <changbin.du@xxxxxxxxx> writes:
>
> > First, printk is NMI context safe now since the safe printk has been
> > implemented. The safe printk already has an irqwork to make NMI context
> > safe.
> >
> > Second, the NMI irqwork actually does not work if a NMI handler causes
> > panic by watchdog timeout. This NMI irqwork have no chance to run in such
> > case, while the safe printk will flush its per-cpu buffer before panic.
> >
> > Signed-off-by: Changbin Du <changbin.du@xxxxxxxxx>
>
> Looks about right.
>
> Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
I'm wondering why is this thing being moved:
- if (delta < nmi_longest_ns || delta < a->max_duration)
- continue;
into nmi_check_duration() and not remaining where it is?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette