[Crash-utility] Fix loading qemu's dump-guest-image

Dave Anderson anderson at redhat.com
Wed May 4 18:26:40 UTC 2016



----- Original Message -----
> qemu can make elf vmcore without kdump in kernel. So kernel may not
> have "kexec_crash_image" symbol.
> 
> Without this patch, kdump_backup_region_init() stops main_loop with
> error.
> 

Queued for crash-7.1.6:

  https://github.com/crash-utility/crash/commit/7eb61b3e7bfb4380594f12af428b4b1787c78e4c

Thanks,
  Dave



> ---
> 
>  netdump.c |   13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff -puN netdump.c~check-kexec_crash_image netdump.c
> --- crash-64/netdump.c~check-kexec_crash_image	2016-03-29 19:38:08.556253626
> +0900
> +++ crash-64-hirofumi/netdump.c	2016-03-29 19:38:08.557253630 +0900
> @@ -4458,11 +4458,14 @@ kdump_backup_region_init(void)
>  	} else
>  		return;
>  
> -	if (!readmem(symbol_value("kexec_crash_image"), KVADDR,
> -		     &kexec_crash_image_p, sizeof(ulong),
> -		     "kexec backup region: kexec_crash_image",
> -		     QUIET|RETURN_ON_ERROR))
> -		goto error;
> +	if (symbol_exists("kexec_crash_image")) {
> +		if (!readmem(symbol_value("kexec_crash_image"), KVADDR,
> +			     &kexec_crash_image_p, sizeof(ulong),
> +			     "kexec backup region: kexec_crash_image",
> +			     QUIET|RETURN_ON_ERROR))
> +			goto error;
> +	} else
> +		kexec_crash_image_p = 0;
>  
>  	if (!kexec_crash_image_p) {
>  		if (CRASHDEBUG(1))
> _
> 
> --
> OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
> 




More information about the Crash-utility mailing list