]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
kdump: print a message in case parse_crashkernel_mem resulted in zero bytes
authorDave Young <dyoung@redhat.com>
Fri, 17 Nov 2017 23:30:12 +0000 (15:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Nov 2017 00:10:03 +0000 (16:10 -0800)
parse_crashkernel_mem() silently returns if we get zero bytes in the
parsing function.  It is useful for debugging to add a message,
especially if the kernel cannot boot correctly.

Add a pr_info instead of pr_warn because it is expected behavior for
size = 0, eg.  crashkernel=2G-4G:128M, size will be 0 in case system
memory is less than 2G.

Link: http://lkml.kernel.org/r/20171114080129.GA6115@dhcp-128-65.nay.redhat.com
Signed-off-by: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Bhupesh Sharma <bhsharma@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/crash_core.c

index 6db80fc0810b9270b0cec3d7cfa2cf9b5a3413f1..b3663896278ed71f854963024caa6549b6a57935 100644 (file)
@@ -108,7 +108,8 @@ static int __init parse_crashkernel_mem(char *cmdline,
                                return -EINVAL;
                        }
                }
-       }
+       } else
+               pr_info("crashkernel size resulted in zero bytes\n");
 
        return 0;
 }