[PATCH] makedumpfile: xen: Fix get_xen_basic_info_x86_64: Can't get the symbol of xenheap_phys_end.

dietmar.hahn at fujitsu.com dietmar.hahn at fujitsu.com
Mon Sep 26 00:24:19 PDT 2022


Hi,
I have a Linux-dom0 running with Xen. The extraction of the vmcore via
makdumpfile shows the message:
get_xen_basic_info_x86_64: Can't get the symbol of xenheap_phys_end.

The commit 2651d571 changed the behaviour of init_xen_crash_info().
With
-       return TRUE;
+       ret = TRUE;
+
+out_error:
+       free(buf);
the buffer is released but it's still used because of
info->xen_crash_info.com = buf;
This leads to random data in the buffer and later to the mentioned
error.

With the change back the memory is not released.
But I'm not familiar enough with code to decide where to do this.

Thanks.
Dietmar.

Signed-off-by: Dietmar Hahn <dietmar.hahn at fujitsu.com>
---
 makedumpfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 65d1c7c..a7cd982 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -9710,7 +9710,7 @@ init_xen_crash_info(void)
        else
                info->xen_crash_info_v = 0;
 
-       ret = TRUE;
+       return  TRUE;
 
 out_error:
        free(buf);
-- 
2.26.2





More information about the kexec mailing list