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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux