From: Paul Walmsley <pjw@kernel.org>
To: Austin Kim <austindh.kim@gmail.com>
Cc: Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH] riscv: kdump: return early for invalid 'crashkernel=0' input
Date: Thu, 12 Feb 2026 17:47:56 -0700 (MST) [thread overview]
Message-ID: <dc0bc3b6-c470-01d8-0785-bb5a88e13182@kernel.org> (raw)
In-Reply-To: <aYVvieviDNvoTRNq@adminpc-PowerEdge-R7525>
Hi,
On Fri, 6 Feb 2026, Austin Kim wrote:
> 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);
Should this fix the common code in kernel/crash_reserve.c to return an
error code when crashkernel=0 so it benefits other architectures?
- Paul
next prev parent reply other threads:[~2026-02-13 0:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 4:35 Austin Kim
2026-02-13 0:47 ` Paul Walmsley [this message]
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=dc0bc3b6-c470-01d8-0785-bb5a88e13182@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=austindh.kim@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
/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 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®