Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf90c05d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Remove VM_MAYWRITE flag to restrict mprotect"

parents 259941df af6de62c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4301,6 +4301,8 @@ kgsl_mmap_memstore(struct file *file, struct kgsl_device *device,
	if (vma->vm_flags & VM_WRITE)
		return -EPERM;

	vma->vm_flags &= ~VM_MAYWRITE;

	if (memdesc->size  != vma_size) {
		dev_err(device->dev, "Cannot partially map the memstore\n");
		return -EINVAL;