Commit a02f50b5 authored by Josh Poimboeuf's avatar Josh Poimboeuf

x86/cpu: Make sure play_dead() doesn't return

After commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead()
return"), play_dead() never returns.  Make that more explicit with a
BUG().

BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.

Link: https://lore.kernel.org/r/11e6ac1cf10f92967882926e3ac16287b50642f2.1676358308.git.jpoimboe@kernel.orgSigned-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
parent b9952d50
...@@ -96,6 +96,7 @@ static inline void __cpu_die(unsigned int cpu) ...@@ -96,6 +96,7 @@ static inline void __cpu_die(unsigned int cpu)
static inline void play_dead(void) static inline void play_dead(void)
{ {
smp_ops.play_dead(); smp_ops.play_dead();
BUG();
} }
static inline void smp_send_reschedule(int cpu) static inline void smp_send_reschedule(int cpu)
......
Markdown is supported
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