diff options
author | Borislav Petkov <bp@suse.de> | 2022-05-20 21:27:29 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-05-27 12:34:45 +0200 |
commit | 2028a255f4df3af9e759f01f958d3237f825f256 (patch) | |
tree | 97c382a550a8deb691da55bc0a4c8adace64cabc /arch/x86 | |
parent | 620f8d3bd3d5e82dff8cc591c831827d4beeae2e (diff) |
x86/extable: Annotate ex_handler_msr_mce() as a dead end
Fix
vmlinux.o: warning: objtool: fixup_exception+0x2d6: unreachable instruction
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220520192729.23969-1-bp@alien8.de
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/extable.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h index 155c991ba95e..eeed395c3177 100644 --- a/arch/x86/include/asm/extable.h +++ b/arch/x86/include/asm/extable.h @@ -42,9 +42,13 @@ extern int ex_get_fixup_type(unsigned long ip); extern void early_fixup_exception(struct pt_regs *regs, int trapnr); #ifdef CONFIG_X86_MCE -extern void ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr); +extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr); #else -static inline void ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) { } +static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr) +{ + for (;;) + cpu_relax(); +} #endif #if defined(CONFIG_BPF_JIT) && defined(CONFIG_X86_64) |