]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/commitdiff
drm: make sure page protections are updated after changing vm_flags.
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 30 Sep 2009 20:57:25 +0000 (13:57 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 30 Sep 2009 20:57:25 +0000 (13:57 -0700)
Some architectures compute ->vm_page_prot depending on ->vm_flags, so
we need to update the protections after adjusting the flags.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/gpu/drm/drm_gem.c

index 8104ecaea26fbe7170d4c85b41ee0a96e6a0bec4..9d3e39fc2e01f20b50104fd41f43fc35a62e4683 100644 (file)
@@ -537,7 +537,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
        vma->vm_ops = obj->dev->driver->gem_vm_ops;
        vma->vm_private_data = map->handle;
        /* FIXME: use pgprot_writecombine when available */
-       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.