diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2020-08-29 09:41:17 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-08-29 09:41:14 -0700 |
commit | 9b93a7d64b0fd6cc5250a121f25ba75296d2b4aa (patch) | |
tree | d4b66a8f840eeba021df06d9202c1b1e9a7c1b78 /drivers/gpu | |
parent | 02e8ec9605d2e2a5dee7c46a73a77df53d5ce66d (diff) | |
parent | cbc3c21971dfb3b5322e080df458ad9d2d477633 (diff) |
Merge "msm: kgsl: Remove VM_MAYWRITE flag to restrict mprotect"
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/msm/kgsl.c | 2 |
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); |