From: Daniel Kiper Subject: [PATCH v3] xen: Enforce page size when it could not be established by other means Date: Mon, 22 Jul 2013 23:19:15 +0200 Message-ID: <1374527955-14968-1-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: andrew.cooper3-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org, kumagai-atsushi-biTfD1RFvDe45+QrQBaojngSJqDPrsil@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org Cc: Daniel Kiper List-Id: xen-devel@lists.xenproject.org Enforce page size when it could not be established by other means. v3 - suggestions/fixes: - rearrange code for readability (suggested by Atsushi Kumagai). Signed-off-by: Daniel Kiper --- makedumpfile.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index b42565c..20a547b 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -7324,8 +7324,6 @@ initial_xen(void) #endif if (!init_xen_crash_info()) return FALSE; - if (!fallback_to_current_page_size()) - return FALSE; /* * Get the debug information for analysis from the vmcoreinfo file */ @@ -7370,6 +7368,16 @@ initial_xen(void) if (!read_vmcoreinfo_from_vmcore(offset, size, TRUE)) return FALSE; } + + if (!info->page_size) { + /* + * If we cannot get page_size from a vmcoreinfo file, + * fall back to the current kernel page size. + */ + if (!fallback_to_current_page_size()) + return FALSE; + } + if (!get_xen_info()) return FALSE; -- 1.7.10.4