mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
8f4e956b31
When a machine check or NMI occurs while multiple byte code is patched the CPU could theoretically see an inconsistent instruction and crash. Prevent this by temporarily disabling MCEs and returning early in the NMI handler. Based on discussion with Mathieu Desnoyers. Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 lines
208 B
C
12 lines
208 B
C
#ifdef CONFIG_X86_MCE
|
|
extern void mcheck_init(struct cpuinfo_x86 *c);
|
|
#else
|
|
#define mcheck_init(c) do {} while(0)
|
|
#endif
|
|
|
|
extern int mce_disabled;
|
|
|
|
extern void stop_mce(void);
|
|
extern void restart_mce(void);
|
|
|