From: Dave Young Date: Fri, 17 Nov 2017 23:30:12 +0000 (-0800) Subject: kdump: print a message in case parse_crashkernel_mem resulted in zero bytes X-Git-Tag: Ubuntu-5.2.0-15.16~5525^2~27 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=de40ccefd1f19180c0a43e4d9b9d2f4dc8856c8b;p=mirror_ubuntu-eoan-kernel.git kdump: print a message in case parse_crashkernel_mem resulted in zero bytes 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 Cc: Baoquan He Cc: Vivek Goyal Cc: Bhupesh Sharma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 6db80fc0810b..b3663896278e 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -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; }