Skip to content
Snippets Groups Projects
Commit 78af1e17 authored by Jordan Crouse's avatar Jordan Crouse Committed by Iliyan Malchev
Browse files

msm: kgsl: Mark mmapped objects with VM_DONTCOPY


Add VM_DONTCOPY to the default set of mmap flags to keep VM objects
from being copied on fork() and causing issues.  KGSL file descriptors
copied to a child are not expected to be usable.

Change-Id: Ic0dedbad85c07118a931ccb9f7a6fd0507da3e5a
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent c240a9bc
Branches
Tags
No related merge requests found
......@@ -527,7 +527,7 @@ static void kgsl_cma_coherent_free(struct kgsl_memdesc *memdesc)
/* Global - also used by kgsl_drm.c */
struct kgsl_memdesc_ops kgsl_page_alloc_ops = {
.free = kgsl_page_alloc_free,
.vmflags = VM_NODUMP | VM_DONTEXPAND,
.vmflags = VM_NODUMP | VM_DONTEXPAND | VM_DONTCOPY,
.vmfault = kgsl_page_alloc_vmfault,
.map_kernel = kgsl_page_alloc_map_kernel,
.unmap_kernel = kgsl_page_alloc_unmap_kernel,
......@@ -537,7 +537,7 @@ EXPORT_SYMBOL(kgsl_page_alloc_ops);
/* CMA ops - used during NOMMU mode */
static struct kgsl_memdesc_ops kgsl_cma_ops = {
.free = kgsl_cma_coherent_free,
.vmflags = VM_NODUMP | VM_PFNMAP | VM_DONTEXPAND,
.vmflags = VM_NODUMP | VM_PFNMAP | VM_DONTEXPAND | VM_DONTCOPY,
.vmfault = kgsl_contiguous_vmfault,
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment