All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin Kim <austindh.kim@gmail.com>
To: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	austindh.kim@gmail.com
Subject: [PATCH] riscv: kdump: return early for invalid 'crashkernel=0' input
Date: Fri, 6 Feb 2026 13:35:21 +0900	[thread overview]
Message-ID: <aYVvieviDNvoTRNq@adminpc-PowerEdge-R7525> (raw)

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


             reply	other threads:[~2026-02-06  4:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06  4:35 Austin Kim [this message]
2026-02-13  0:47 ` [PATCH] riscv: kdump: return early for invalid 'crashkernel=0' input Paul Walmsley
2026-02-13  0:47   ` Paul Walmsley
2026-02-13  1:16   ` Austin Kim
2026-02-13  1:16     ` Austin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYVvieviDNvoTRNq@adminpc-PowerEdge-R7525 \
    --to=austindh.kim@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.