diff options
author | Michel Daenzer <michel@daenzer.net> | 2003-05-17 00:37:34 +0000 |
---|---|---|
committer | Michel Daenzer <michel@daenzer.net> | 2003-05-17 00:37:34 +0000 |
commit | b942999b5915cbad75f16f6c242bab03c33f0c8b (patch) | |
tree | 8a21a72a5ef9b220dba81578de1430c3a56caeab /linux-core | |
parent | e5d3c7f260d18168eec755c73f01ac617390d96c (diff) |
do allow reading from read only mappings...
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 59b19da3..f9c1e356 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -416,7 +416,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma) if (map->size != vma->vm_end - vma->vm_start) return -EINVAL; if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) { - vma->vm_flags &= VM_MAYWRITE; + vma->vm_flags &= (VM_READ | VM_MAYREAD); #if defined(__i386__) || defined(__x86_64__) pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW; #else |