[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
<FRZP193MB2563F43FFC350926C0B7EEB1DC872@FRZP193MB2563.EURP193.PROD.OUTLOOK.COM>
Date: Wed, 14 Aug 2024 16:24:45 +0200
From: Enno Onneken <ennoonneken@...look.de>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Enno Onneken <ennoonneken@...look.de>
Subject: [PATCH] reboot: add missing break to switch statement for LINUX_REBOOT_CMD_HALT
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@...look.de>
---
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
Powered by blists - more mailing lists