diff mbox series

[v2] arm: kdump: add invalid input check for 'crashkernel=0'

Message ID 20220331112416.GA1002@raspberrypi (mailing list archive)
State New, archived
Headers show
Series [v2] arm: kdump: add invalid input check for 'crashkernel=0' | expand

Commit Message

Austin Kim March 31, 2022, 11:24 a.m. UTC
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(-)

Comments

Russell King (Oracle) March 31, 2022, 1:05 p.m. UTC | #1
On Thu, Mar 31, 2022 at 12:24:16PM +0100, Austin Kim wrote:
> 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>

Thanks, this looks fine. Please send it to the patch system, link
in my signature below. Thanks.
Austin Kim March 31, 2022, 8:16 p.m. UTC | #2
2022년 3월 31일 (목) 오후 10:05, Russell King (Oracle) <linux@armlinux.org.uk>님이 작성:
>
> On Thu, Mar 31, 2022 at 12:24:16PM +0100, Austin Kim wrote:
> > 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>
>
> Thanks, this looks fine. Please send it to the patch system, link
> in my signature below. Thanks.

Will send it to the patch
system(https://www.armlinux.org.uk/developer/patches/),
thanks!

BR,
Austin Kim

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

Patch

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) {