From: Min Fanlei minfanlei@wxiat.com
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56WV8
--------------------------------
The page flag of the first page after kvm memory pool is incorrectly set to "reserved", which will result in page dumped if user try to apply for it.
Now we exclude the page to fix it.
Signed-off-by: Min Fanlei minfanlei@wxiat.com
Signed-off-by: Gu Zitao guzitao@wxiat.com Acked-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/sw_64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sw_64/kernel/setup.c b/arch/sw_64/kernel/setup.c index 67d01f8cfe22..ca19445ac883 100644 --- a/arch/sw_64/kernel/setup.c +++ b/arch/sw_64/kernel/setup.c @@ -1017,7 +1017,7 @@ static int __init sw64_kvm_pool_init(void) gen_pool_set_algo(sw64_kvm_pool, gen_pool_best_fit, NULL);
base_page = pfn_to_page(kvm_mem_base >> PAGE_SHIFT); - end_page = pfn_to_page((kvm_mem_base + kvm_mem_size) >> PAGE_SHIFT); + end_page = pfn_to_page((kvm_mem_base + kvm_mem_size - 1) >> PAGE_SHIFT);
p = base_page; while (page_ref_count(p) == 0 &&