Skip to content

Commit

Permalink
ANDROID: ashmem: fix up vm_flags direct access which is not allowed a…
Browse files Browse the repository at this point in the history
…nymore

Commit 1c71222 ("mm: replace vma->vm_flags direct modifications
with modifier calls") removed the ability to directly access vm_flags, but
provided wrapper functions to do the task instead.  Use vm_flags_clear()
to fix the build breakage in the ashmem code because of this change.

Fixes: 1c71222 ("mm: replace vma->vm_flags direct modifications with modifier calls")
Cc: Suren Baghdasaryan <[email protected]>
Change-Id: I865469c1eacd8d037eaaa85eca65e54f717e8706
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh authored and Treehugger Robot committed Apr 6, 2023
1 parent fc97cf1 commit 78ffde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/android/ashmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
ret = -EPERM;
goto out;
}
vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
vm_flags_clear(vma, calc_vm_may_flags(~asma->prot_mask));

if (!asma->file) {
char *name = ASHMEM_NAME_DEF;
Expand Down

0 comments on commit 78ffde1

Please sign in to comment.