2017-11-14 08:12:09

by Dave Young

[permalink] [raw]
Subject: [PATCH V2] kdump: print a message in case parse_crashkernel_mem resulted in zero bytes

In parse_crashkernel_mem, it silently return in case we get zero
bytes in the parsing function. It is useful for debugging for
adding a message especially sometimes kernel can not boot
up 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.

Signed-off-by: Dave Young <[email protected]>
---
[v1 -> v2]: bhsharma: pr_warn looks confusing because of return 0
kernel/crash_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-x86.orig/kernel/crash_core.c
+++ linux-x86/kernel/crash_core.c
@@ -108,7 +108,8 @@ static int __init parse_crashkernel_mem(
return -EINVAL;
}
}
- }
+ } else
+ pr_info("crashkernel size resulted in zero bytes\n");

return 0;
}

From 1584044860993818457@xxx Tue Nov 14 12:34:59 +0000 2017
X-GM-THRID: 1583947963447418004
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread