diff options
author | Dave Airlie <airlied@linux.ie> | 2007-02-09 20:07:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-03-10 20:07:17 -0500 |
commit | 54ba2f76e281286cf4b2860ed8354602eab4c1ef (patch) | |
tree | 940225510c754dfd730193f0fb21d9642b5749f2 /drivers/char/drm/drm_vm.c | |
parent | 5cc7f9abec8391e43b0a052c8880509668e24b35 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 7ed77e16488c..9e3f25946590 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) | |||
589 | return -EPERM; | 589 | return -EPERM; |
590 | 590 | ||
591 | /* Check for valid size. */ | 591 | /* Check for valid size. */ |
592 | if (map->size != vma->vm_end - vma->vm_start) | 592 | if (map->size < vma->vm_end - vma->vm_start) |
593 | return -EINVAL; | 593 | return -EINVAL; |
594 | 594 | ||
595 | if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) { | 595 | if (!capable(CAP_SYS_ADMIN) && (map->flags & _DRM_READ_ONLY)) { |