From e2d00715cc1d3919aadd5066ef7355049f417bd2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 26 Jul 2007 13:25:21 +1000 Subject: drm: fix size argument for copy to/from user --- linux-core/drm_bo.c | 4 ++-- 1 file 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); -- cgit v1.2.3