[PATCH v2 2/3] makedumpfile: Move get_versiondep_info calling earlier

Baoquan He bhe at redhat.com
Thu Oct 6 02:50:07 PDT 2016


Because is_vmalloc_addr_x86_64 need be called very early, e.g in
readmem(). So we have to move get_versiondep_info calling earlier
to let PAGE_OFFSET/VMALLOC_START/VMEMMAP_START get value before
use them.

Signed-off-by: Baoquan He <bhe at redhat.com>
---
 makedumpfile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 89e1089..e132550 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3835,6 +3835,9 @@ initial(void)
 	if (!get_value_for_old_linux())
 		return FALSE;
 
+	if (!get_versiondep_info())
+		return FALSE;
+
 	if (info->flag_mem_usage && !get_kcore_dump_loads())
 		return FALSE;
 
@@ -3986,9 +3989,6 @@ out:
 		if (!check_release())
 			return FALSE;
 
-		if (!get_versiondep_info())
-			return FALSE;
-
 		/*
 		 * NOTE: This must be done before refering to
 		 * VMALLOC'ed memory. The first 640kB contains data
-- 
2.5.5




More information about the kexec mailing list