summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-07-26 13:25:21 +1000
committerDave Airlie <airlied@redhat.com>2007-07-26 13:26:04 +1000
commite2d00715cc1d3919aadd5066ef7355049f417bd2 (patch)
treeb9c0603fc675528c14afbe65fcf6a2926226bfe9
parentf2528cbc965858c6a7a81d659f9d5f4da290b5ae (diff)
drm: fix size argument for copy to/from user
-rw-r--r--linux-core/drm_bo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index 75d89e46..b47b657f 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -1720,7 +1720,7 @@ int drm_bo_op_ioctl(struct drm_device *dev, void *data, struct drm_file *file_pr
if (next != 0) {
curuserarg = (void __user *)next;
if (copy_from_user(&curarg, curuserarg,
- sizeof(arg)) != 0)
+ sizeof(curarg)) != 0)
return -EFAULT;
arg = &curarg;
}
@@ -1768,7 +1768,7 @@ int drm_bo_op_ioctl(struct drm_device *dev, void *data, struct drm_file *file_pr
arg->d.rep.bo_info = rep;
if (arg != data) {
if (copy_to_user(curuserarg, &curarg,
- sizeof(arg)) != 0)
+ sizeof(curarg)) != 0)
return -EFAULT;
}
} while (next != 0);