public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Austin Kim <austindh.kim@gmail.com>
To: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk, arnd@arndb.de
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, austin.kim@lge.com,
	p4ranlee@gmail.com
Subject: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
Date: Wed, 30 Mar 2022 12:07:15 +0100	[thread overview]
Message-ID: <20220330110715.GA1534@raspberrypi> (raw)

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

Add invalid value check expression when no crashkernel= or invalid value 
specified using kdump.

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

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 039feb7cd590..8018d71ccaed 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1004,7 +1004,8 @@ static void __init reserve_crashkernel(void)
 	total_mem = get_total_mem();
 	ret = parse_crashkernel(boot_command_line, total_mem,
 				&crash_size, &crash_base);
-	if (ret)
+	/* no crashkernel= or invalid value specified */
+	if (ret || !crash_size)
 		return;
 
 	if (crash_base <= 0) {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-03-30 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 11:07 Austin Kim [this message]
2022-03-31  7:10 ` [PATCH] arm: kdump: add invalid value check for 'crashkernel=' Russell King (Oracle)
2022-03-31  9:49   ` 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=20220330110715.GA1534@raspberrypi \
    --to=austindh.kim@gmail.com \
    --cc=arnd@arndb.de \
    --cc=austin.kim@lge.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=p4ranlee@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /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