All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin Kim <austindh.kim@gmail.com>
To: linux@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 v2] arm: kdump: add invalid input check for 'crashkernel=0'
Date: Thu, 31 Mar 2022 12:24:16 +0100	[thread overview]
Message-ID: <20220331112416.GA1002@raspberrypi> (raw)

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

Add invalid input check expression when 'crashkernel=0' is specified 
running 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..1e8a50a97edf 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)
+	/* invalid value specified or crashkernel=0 */
+	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

WARNING: multiple messages have this Message-ID (diff)
From: Austin Kim <austindh.kim@gmail.com>
To: linux@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 v2] arm: kdump: add invalid input check for 'crashkernel=0'
Date: Thu, 31 Mar 2022 12:24:16 +0100	[thread overview]
Message-ID: <20220331112416.GA1002@raspberrypi> (raw)

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

Add invalid input check expression when 'crashkernel=0' is specified 
running 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..1e8a50a97edf 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)
+	/* invalid value specified or crashkernel=0 */
+	if (ret || !crash_size)
 		return;
 
 	if (crash_base <= 0) {
-- 
2.20.1


             reply	other threads:[~2022-03-31 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 11:24 Austin Kim [this message]
2022-03-31 11:24 ` [PATCH v2] arm: kdump: add invalid input check for 'crashkernel=0' Austin Kim
2022-03-31 13:05 ` Russell King (Oracle)
2022-03-31 13:05   ` Russell King (Oracle)
2022-03-31 20:16   ` Austin Kim
2022-03-31 20: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=20220331112416.GA1002@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 \
    /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.