ARM: 9190/1: kdump: add invalid input check for 'crashkernel=0'
authorAustin Kim <austindh.kim@gmail.com>
Fri, 1 Apr 2022 08:30:51 +0000 (09:30 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 1 Apr 2022 11:58:08 +0000 (12:58 +0100)
Add invalid input check expression when 'crashkernel=0' is specified
running kdump.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/setup.c

index 284a80c..7646d3a 100644 (file)
@@ -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) {