[PATCH] makedumpfile: fix to exclude_unnecessary_pages_cyclic

Cliff Wickman cpw at sgi.com
Wed Nov 21 14:45:51 EST 2012


The || in exclude_unnecessary_pages_cyclic() makes makedumpfile
scan all the memmap sections, not just the ones containing the current
cyclic range.

Diffed against makedumpfile-1.5.1
---
 makedumpfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: makedumpfile-1.5.1/makedumpfile.c
===================================================================
--- makedumpfile-1.5.1.orig/makedumpfile.c
+++ makedumpfile-1.5.1/makedumpfile.c
@@ -4187,7 +4187,7 @@ exclude_unnecessary_pages_cyclic(void)
 			if (mmd->mem_map == NOT_MEMMAP_ADDR)
 				continue;
 
-			if (mmd->pfn_end >= info->cyclic_start_pfn || mmd->pfn_start <= info->cyclic_end_pfn) {
+			if (mmd->pfn_end >= info->cyclic_start_pfn && mmd->pfn_start <= info->cyclic_end_pfn) {
 				if (!__exclude_unnecessary_pages(mmd->mem_map,
 								 mmd->pfn_start, mmd->pfn_end))
 					return FALSE;



More information about the kexec mailing list