Skip to content
Commit 35dbd024 authored by Changbin Du's avatar Changbin Du Committed by Greg Kroah-Hartman
Browse files

x86/nmi: Remove irq_work from the long duration NMI handler



[ Upstream commit 248ed510 ]

First, printk() is NMI-context safe now since the safe printk() has been
implemented and it already has an irq_work to make NMI-context safe.

Second, this NMI irq_work actually does not work if a NMI handler causes
panic by watchdog timeout. It has no chance to run in such case, while
the safe printk() will flush its per-cpu buffers before panicking.

While at it, repurpose the irq_work callback into a function which
concentrates the NMI duration checking and makes the code easier to
follow.

 [ bp: Massage. ]

Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200111125427.15662-1-changbin.du@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 45a6f48e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment