
From: Zhou Guanghui <zhouguanghui1@huawei.com> Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PZDX -------------------------------- We could determine if a userspace map is huge-mapped after walking its pagetable. So the uva_align should be calculated again after walking the pagetable if it is huge-mapped. Signed-off-by: Zhou Guanghui <zhouguanghui1@huawei.com> --- mm/share_pool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/share_pool.c b/mm/share_pool.c index 7b78a75f1bf7..1c0b2a0a6823 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -3189,6 +3189,9 @@ static int __sp_walk_page_range(unsigned long uva, unsigned long size, sp_walk_data->pages = NULL; } + if (sp_walk_data->is_hugepage) + sp_walk_data->uva_aligned = ALIGN_DOWN(uva, PMD_SIZE); + return ret; } -- 2.20.1