All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: kdump: return early for invalid 'crashkernel=0' input
@ 2026-02-06  4:35 Austin Kim
  2026-02-13  0:47   ` Paul Walmsley
  0 siblings, 1 reply; 5+ messages in thread
From: Austin Kim @ 2026-02-06  4:35 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Alexandre Ghiti
  Cc: linux-kernel, linux-riscv, austindh.kim

From: Austin Kim <austin.kim@lge.com>

An invalid 'crashkernel=0' can be specified when running kdump.
By adding a check for 'crashkernel=0', it can return early when detecting
this invalid input.

Signed-off-by: Austin Kim <austin.kim@lge.com>
---
 arch/riscv/mm/init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 811e03786..e61fec445 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -1409,7 +1409,8 @@ static void __init arch_reserve_crashkernel(void)
 	ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
 				&crash_size, &crash_base,
 				&low_size, NULL, &high);
-	if (ret)
+	/* invalid value specified or 'crashkernel=0' */
+	if (ret || !crash_size)
 		return;
 
 	reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
-- 
2.34.1


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

end of thread, other threads:[~2026-02-13  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06  4:35 [PATCH] riscv: kdump: return early for invalid 'crashkernel=0' input Austin Kim
2026-02-13  0:47 ` Paul Walmsley
2026-02-13  0:47   ` Paul Walmsley
2026-02-13  1:16   ` Austin Kim
2026-02-13  1:16     ` Austin Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.