summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2020-08-29 09:41:17 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2020-08-29 09:41:14 -0700
commit9b93a7d64b0fd6cc5250a121f25ba75296d2b4aa (patch)
treed4b66a8f840eeba021df06d9202c1b1e9a7c1b78 /drivers/gpu
parent02e8ec9605d2e2a5dee7c46a73a77df53d5ce66d (diff)
parentcbc3c21971dfb3b5322e080df458ad9d2d477633 (diff)
Merge "msm: kgsl: Remove VM_MAYWRITE flag to restrict mprotect"
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/msm/kgsl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index 44522cac7c42..1e30cd9e3524 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -4202,6 +4202,8 @@ kgsl_mmap_memstore(struct kgsl_device *device, struct vm_area_struct *vma)
if (vma->vm_flags & VM_WRITE)
return -EPERM;
+ vma->vm_flags &= ~VM_MAYWRITE;
+
if (memdesc->size != vma_size) {
KGSL_MEM_ERR(device, "memstore bad size: %d should be %llu\n",
vma_size, memdesc->size);