]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86: Convert unreachable() to BUG()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 28 Nov 2024 09:39:02 +0000 (10:39 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 2 Dec 2024 11:01:43 +0000 (12:01 +0100)
commit2190966fbc14ca2cd4ea76eefeb96a47d8e390df
tree563acbe5a6484f4a525fbf59434a07cb15eadd42
parentc837de3810982cd41cd70e5170da1931439f025c
x86: Convert unreachable() to BUG()

Avoid unreachable() as it can (and will in the absence of UBSAN)
generate fallthrough code. Use BUG() so we get a UD2 trap (with
unreachable annotation).

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20241128094312.028316261@infradead.org
arch/x86/kernel/process.c
arch/x86/kernel/reboot.c
arch/x86/kvm/svm/sev.c