ab224c
makedumpfile: disable mmap read
ab224c
ab224c
There's a kernel bug for mapping mem ranges which end with
ab224c
an address not aligned to page boundry. It's still not resolved
ab224c
in upstream, so let's disable mmap read for now as a workaround.
ab224c
ab224c
Once upstream got a right fix we can revert this patch.
ab224c
ab224c
Signed-off-by: Dave Young <dyoung@redhat.com>
ab224c
---
ab224c
 makedumpfile.c |    7 +++++++
ab224c
 1 file changed, 7 insertions(+)
ab224c
ab224c
--- kexec-tools/makedumpfile-1.5.4/makedumpfile.c.orig
ab224c
+++ kexec-tools/makedumpfile-1.5.4/makedumpfile.c
ab224c
@@ -3144,6 +3144,12 @@ out:
ab224c
 	if (info->dump_level & DL_EXCLUDE_FREE)
ab224c
 		setup_page_is_buddy();
ab224c
 
ab224c
+	/* There's a kernel bug for mapping mem ranges which end with
ab224c
+	 * an address not aligned to page boundry. It's still not resolved
ab224c
+	 * in upstream, so let's disable mmap read for now.
ab224c
+	 */
ab224c
+	info->flag_usemmap = FALSE;
ab224c
+#if 0
ab224c
 	if (!initialize_mmap()) {
ab224c
 		/* this kernel does not support mmap of vmcore */
ab224c
 		DEBUG_MSG("Kernel can't mmap vmcore, using reads.\n");
ab224c
@@ -3152,6 +3158,7 @@ out:
ab224c
 		DEBUG_MSG("read %s with mmap()\n", info->name_memory);
ab224c
 		info->flag_usemmap = TRUE;
ab224c
 	}
ab224c
+#endif
ab224c
 
ab224c
 	return TRUE;
ab224c
 }