[PATCH] reboot: add missing break to switch statement for LINUX_REBOOT_CMD_HALT

From: Enno Onneken
Date: Wed Aug 14 2024 - 10:25:26 EST


All switch-cases should be isolated from each other due to shutting
down/rebooting the kernel in different ways.
In order to fully isolate this case (like all the others are), this patch
adds a "break;" after do_exit(0); .

Fixes: 15d94b82565e ("reboot: move shutdown/reboot related functions to kernel/reboot.c")
Signed-off-by: Enno Onneken <ennoonneken@xxxxxxxxxx>
---
kernel/reboot.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/reboot.c b/kernel/reboot.c
index f05dbde2c93f..05dc02748c06 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -765,6 +765,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
case LINUX_REBOOT_CMD_HALT:
kernel_halt();
do_exit(0);
+ break;

case LINUX_REBOOT_CMD_POWER_OFF:
kernel_power_off();
--
2.34.1