[PATCH 1/3] makedumpfile/xen: Move Xen crash dump check
Daniel Kiper
daniel.kiper at oracle.com
Tue Nov 26 15:18:47 EST 2013
Commit 92563d7a7a5175ef78c4a94ee269b1b455331b4c (cache: Allocate buffers
at initialization to detect malloc() failure) split cache_alloc() to
cache_init() and cache_alloc(). cache_init() is called in initial().
However, sadly initial_xen() is called before cache_init() and it uses
cache_alloc() indirectly which refers to uninitialized structures.
Hence, makedumfile run on Xen crash dumps finally fails. This patch moves
initial_xen() behind cache_init() call and fixes above mentioned issue.
Signed-off-by: Daniel Kiper <daniel.kiper at oracle.com>
---
makedumpfile.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index 0c68f32..74376cd 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2905,9 +2905,6 @@ initial(void)
unsigned long size;
int debug_info = FALSE;
- if (is_xen_memory() && !initial_xen())
- return FALSE;
-
#ifdef USELZO
if (lzo_init() == LZO_E_OK)
info->flag_lzo_support = TRUE;
@@ -3172,7 +3169,7 @@ out:
return FALSE;
}
- if (is_xen_memory() && !get_dom0_mapnr())
+ if (is_xen_memory() && (!initial_xen() || !get_dom0_mapnr()))
return FALSE;
if (!get_value_for_old_linux())
--
1.7.10.4
More information about the kexec
mailing list