[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220330110715.GA1534@raspberrypi>
Date: Wed, 30 Mar 2022 12:07:15 +0100
From: Austin Kim <austindh.kim@...il.com>
To: linux@...linux.org.uk, rmk+kernel@...linux.org.uk, arnd@...db.de
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
austin.kim@....com, p4ranlee@...il.com
Subject: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
From: Austin Kim <austin.kim@....com>
Add invalid value check expression when no crashkernel= or invalid value
specified using kdump.
Signed-off-by: Austin Kim <austin.kim@....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
Powered by blists - more mailing lists