lkml.org 
[lkml]   [2017]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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 <dyoung@redhat.com>
---
[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;
}
\
 
 \ /
  Last update: 2017-11-14 09:02    [W:0.024 / U:11.388 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site