[PATCH] kexec: check if memory is reserved only when loading kdump kernel.
Simon Horman
horms at verge.net.au
Tue May 14 20:35:33 EDT 2013
On Tue, May 14, 2013 at 06:32:50PM +0800, WANG Chao wrote:
> When memory for crashkernel isn't reserved, it's confusing that kexec
> spits error message for unloading kdump kernel as if we were loading it:
>
> # kexec -p -u
> Memory for crashkernel is not reserved
> Please reserve memory by passing "crashkernel=X at Y" parameter to the kernel
> Then try loading kdump kernel
> # echo $?
> 1
>
> It's more appropriate to test if memory is reserved only when
> loading kdump kernel. With this patch:
>
> # kexec -p -u
> # echo $?
> 0
>
> It's also the same behavior with the case of trying to unload kernel
> from unloaded state.
>
> Signed-off-by: WANG Chao <chaowang at redhat.com>
Thanks, applied.
More information about the kexec
mailing list