mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
x86/nmi: Rate limit unknown NMI messages
On some AMD machines, unknown NMI messages were printed on the console continuously when using perf command with IBS. It was reported that it can slow down the kernel. Ratelimit the unknown NMI messages. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Ravi Bangoria <ravi.bangoria@amd.com> Acked-by: Guilherme Amadio <amadio@gentoo.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20231209015211.357983-1-namhyung@kernel.org
This commit is contained in:
parent
49527ca264
commit
e2fbc857d3
|
|
@ -303,13 +303,13 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
|
|||
|
||||
__this_cpu_add(nmi_stats.unknown, 1);
|
||||
|
||||
pr_emerg("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
|
||||
reason, smp_processor_id());
|
||||
pr_emerg_ratelimited("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
|
||||
reason, smp_processor_id());
|
||||
|
||||
if (unknown_nmi_panic || panic_on_unrecovered_nmi)
|
||||
nmi_panic(regs, "NMI: Not continuing");
|
||||
|
||||
pr_emerg("Dazed and confused, but trying to continue\n");
|
||||
pr_emerg_ratelimited("Dazed and confused, but trying to continue\n");
|
||||
}
|
||||
NOKPROBE_SYMBOL(unknown_nmi_error);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user