
From: Ma Wupeng <mawupeng1@huawei.com> euleros inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7WLVX --------------------------------------------- During mmap_region, vm_flags is not save in gmf which lead to prot in gmf is always VM_NONE. To fix this, update prot to vmf. Fixes: 848492f233ce ("mm: gmem: Introduce vm_object for gmem") Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mmap.c b/mm/mmap.c index 061cc7381233..0e9bd51a5b45 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2745,7 +2745,7 @@ static int alloc_va_in_peer_devices(struct mm_struct *mm, if (!mm->gm_as) return -ENODEV; - prot |= vm_flags; + gmf.prot |= vm_flags; if (!vma->vm_obj) vma->vm_obj = vm_object_create(vma); if (!vma->vm_obj) -- 2.25.1