27 lines
909 B
Diff
27 lines
909 B
Diff
From fe71ffabcc7e5787b0bcf0b4cfcdab83182b84fd Mon Sep 17 00:00:00 2001
|
|
From: Ming Wang <wangming01@loongson.cn>
|
|
Date: Mon, 14 Oct 2024 16:23:08 +0800
|
|
Subject: [PATCH] Fix incorrect page exclusion in exclude_nodata_pages()
|
|
|
|
Signed-off-by: Ming Wang <wangming01@loongson.cn>
|
|
---
|
|
makedumpfile-1.7.4/makedumpfile.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/makedumpfile-1.7.4/makedumpfile.c b/makedumpfile-1.7.4/makedumpfile.c
|
|
index a6ec9d4..4ddbf4d 100644
|
|
--- a/makedumpfile-1.7.4/makedumpfile.c
|
|
+++ b/makedumpfile-1.7.4/makedumpfile.c
|
|
@@ -5192,7 +5192,7 @@ exclude_nodata_pages(struct cycle *cycle)
|
|
NULL, &file_size)) {
|
|
unsigned long long pfn, pfn_end;
|
|
|
|
- pfn = paddr_to_pfn(phys_start + file_size);
|
|
+ pfn = paddr_to_pfn(roundup(phys_start + file_size, PAGESIZE()));
|
|
pfn_end = paddr_to_pfn(roundup(phys_end, PAGESIZE()));
|
|
|
|
if (pfn < cycle->start_pfn)
|
|
--
|
|
2.41.0
|
|
|