summaryrefslogtreecommitdiff
path: root/linux/drm_vm.h
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2001-05-23 17:41:31 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2001-05-23 17:41:31 +0000
commitdca245e37c875660fa766a264377628dd3a311e5 (patch)
tree97b5e4d2b7d2fe83dace76ce148f81af6dad1041 /linux/drm_vm.h
parent18ce40c9d31c166b49e6689c260eb1ddb3cc08c9 (diff)
Only authenticated clients can mmap() (Jeff Hartmann).X_4_1_0-20010614-preimport
Diffstat (limited to 'linux/drm_vm.h')
-rw-r--r--linux/drm_vm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index 771c11bd2..d17a13707 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -377,6 +377,8 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n",
vma->vm_start, vma->vm_end, VM_OFFSET(vma));
+ if ( !priv->authenticated ) return -EACCES;
+
if (!VM_OFFSET(vma)) return DRM(mmap_dma)(filp, vma);
/* A sequential search of a linked list is