On the current implementation, __exclude_unnecessary_pages() can refer to page frames not belonging to current cycle. Thus, pfn_free can be now counted up even if it doesn't belong to the current cycle. This patch changes it so pfn_free is counted up only if the corresponding pfn really belongs to the cycle. Signed-off-by: HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com> --- makedumpfile.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index acb1b21..817da34 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -4224,9 +4224,9 @@ __exclude_unnecessary_pages(unsigned long mem_map, * See check_cyclic_buffer_overrun() * for the detail. */ - clear_bit_on_2nd_bitmap_for_kernel(pfn + i); + if (clear_bit_on_2nd_bitmap_for_kernel(pfn + i)) + pfn_free++; } - pfn_free += i; } /* * Exclude the cache page without the private page. -- 1.7.7.6