Skip to contentSkip to conversation

arm: kdump: add invalid value check for 'crashkernel='

PATCH Superseded Austin Kim 2 participants 3 messages Mar 30, 2022 – Mar 31, 2022 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 arm: kdump: add invalid value check for 'crashkernel='

From: Austin Kim <[email protected]>

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

---
 arch/arm/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/kernel/setup.c +2 -1
index 039feb7cd590..8018d71ccaed 100644
@@ -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) {
Signature · 1 line
2.20.1
#1 lore raw
Quoted 4 lines · Austin Kim

From: Austin Kim <[email protected]>

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

Hi,

I think you mean when "crashkernel=0" is specified, as other invalid input should result in -EINVAL being returned. Please update the patch description and comment.

Thanks.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
author
#2 lore raw

2022년 3월 31일 (목) 오후 4:10, Russell King (Oracle) <[email protected]>님이 작성:

Quoted 12 lines · Austin Kim
Quoted 4 lines

From: Austin Kim <[email protected]>

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

Hi,

I think you mean when "crashkernel=0" is specified, as other invalid input should result in -EINVAL being returned. Please update the patch description and comment.

Thanks for feedback.
Let me resend the patch with updated commit description and comment soon.

BR,
Austin Kim

Quoted 6 lines

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!