[PATCH] kexec, remove panic_on_warn kernel parameter from kdump situations

Vivek Goyal vgoyal at redhat.com
Fri Jan 2 04:54:23 PST 2015


On Tue, Dec 30, 2014 at 09:57:51AM -0500, Prarit Bhargava wrote:
> panic_on_warn kernel parameter will cause the kernel to panic when a
> WARN() is hit in the kernel.  This is not a good situation for the kdump
> kernel because then it would be possible for the kdump kernel to panic in
> a non-fatal WARN().
> 
> This patch removes panic_on_warn as a kernel parameter for the kdump
> kernel.
> 

I think modifying kexec-tools is not best place for this. It probably is better to take care of this in distribution specific scripts.

In the past we have learnt that it is best that kexec-tools does least
amount of manipulation with command line.

Thanks
Vivek

> Signed-off-by: Prarit Bhargava <prarit at redhat.com>
> Cc: Dave Young <dyoung at redhat.com>
> Cc: Vivek Goyal <vgoyal at redhat.com>
> Cc: WANG Chao <chaowang at redhat.com>
> ---
>  kexec/kexec.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/kexec/kexec.c b/kexec/kexec.c
> index b088916..323cafb 100644
> --- a/kexec/kexec.c
> +++ b/kexec/kexec.c
> @@ -1048,8 +1048,10 @@ char *get_command_line(void)
>  	line[strlen(line) - 1] = '\0';
>  
>  	remove_parameter(line, "BOOT_IMAGE");
> -	if (kexec_flags & KEXEC_ON_CRASH)
> +	if (kexec_flags & KEXEC_ON_CRASH) {
>  		remove_parameter(line, "crashkernel");
> +		remove_parameter(line, "panic_on_warn");
> +	}
>  
>  	return line;
>  }
> -- 
> 1.7.9.3



More information about the kexec mailing list