aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm/drm_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-02-10 12:07:47 +1100
committerDave Airlie <airlied@linux.ie>2007-03-11 12:07:17 +1100
commit54ba2f76e281286cf4b2860ed8354602eab4c1ef (patch)
tree940225510c754dfd730193f0fb21d9642b5749f2 /drivers/char/drm/drm_vm.c
parent5cc7f9abec8391e43b0a052c8880509668e24b35 (diff)
drm: bring bufs code from git tree.
This checks the AGP mappings are in a valid place and also fixes the size check in the vm.. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r--drivers/char/drm/drm_vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 7ed77e16488..9e3f2594659 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -589,7 +589,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
return -EPERM;
/* Check for valid size. */
- if (map->size != vma->vm_end - vma->vm_start)
+ if (map->size < vma->vm_end - vma->vm_start)
return -EINVAL;
if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) {