Skip to content

Commit

Permalink
kdump: print a message in case parse_crashkernel_mem resulted in zero…
Browse files Browse the repository at this point in the history
… 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/[email protected]
Signed-off-by: Dave Young <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: Bhupesh Sharma <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
daveyoung authored and torvalds committed Nov 18, 2017
1 parent 4269157 commit de40cce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/crash_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit de40cce

Please sign in to comment.