drm: make sure page protections are updated after changing vm_flags
[deliverable/linux.git] / drivers / gpu / drm / drm_gem.c
index 80391995bdec05f07e809e33651466379c7823b3..e9dbb481c469f4a0071256349bd7a5e7a1239dcd 100644 (file)
@@ -552,7 +552,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
        vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND;
        vma->vm_ops = obj->dev->driver->gem_vm_ops;
        vma->vm_private_data = map->handle;
-       vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+       vma->vm_page_prot =  pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
 
        /* Take a ref for this mapping of the object, so that the fault
         * handler can dereference the mmap offset's pointer to the object.
This page took 0.024714 seconds and 5 git commands to generate.