mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] reboot: add missing break to switch statement for LINUX_REBOOT_CMD_HALT
@ 2024-08-14 14:24 Enno Onneken
  2024-08-14 15:47 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Enno Onneken @ 2024-08-14 14:24 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, kernel-janitors, Enno Onneken

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@outlook.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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-14 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14 14:24 [PATCH] reboot: add missing break to switch statement for LINUX_REBOOT_CMD_HALT Enno Onneken
2024-08-14 15:47 ` Dan Carpenter
2024-08-14 18:12   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®