aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_ioc32.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_ioc32.c')
-rw-r--r--drivers/gpu/drm/drm_ioc32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 67b1fca39aa6..0e3043e08c69 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -185,7 +185,7 @@ static int compat_drm_getmap(struct file *file, unsigned int cmd,
185 m32.size = map.size; 185 m32.size = map.size;
186 m32.type = map.type; 186 m32.type = map.type;
187 m32.flags = map.flags; 187 m32.flags = map.flags;
188 m32.handle = ptr_to_compat(map.handle); 188 m32.handle = ptr_to_compat((void __user *)map.handle);
189 m32.mtrr = map.mtrr; 189 m32.mtrr = map.mtrr;
190 if (copy_to_user(argp, &m32, sizeof(m32))) 190 if (copy_to_user(argp, &m32, sizeof(m32)))
191 return -EFAULT; 191 return -EFAULT;
@@ -216,7 +216,7 @@ static int compat_drm_addmap(struct file *file, unsigned int cmd,
216 216
217 m32.offset = map.offset; 217 m32.offset = map.offset;
218 m32.mtrr = map.mtrr; 218 m32.mtrr = map.mtrr;
219 m32.handle = ptr_to_compat(map.handle); 219 m32.handle = ptr_to_compat((void __user *)map.handle);
220 if (map.handle != compat_ptr(m32.handle)) 220 if (map.handle != compat_ptr(m32.handle))
221 pr_err_ratelimited("compat_drm_addmap truncated handle %p for type %d offset %x\n", 221 pr_err_ratelimited("compat_drm_addmap truncated handle %p for type %d offset %x\n",
222 map.handle, m32.type, m32.offset); 222 map.handle, m32.type, m32.offset);
@@ -526,7 +526,7 @@ static int compat_drm_getsareactx(struct file *file, unsigned int cmd,
526 if (err) 526 if (err)
527 return err; 527 return err;
528 528
529 req32.handle = ptr_to_compat(req.handle); 529 req32.handle = ptr_to_compat((void __user *)req.handle);
530 if (copy_to_user(argp, &req32, sizeof(req32))) 530 if (copy_to_user(argp, &req32, sizeof(req32)))
531 return -EFAULT; 531 return -EFAULT;
532 532