summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/mga_ioc32.c2
-rw-r--r--linux-core/r128_ioc32.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/linux-core/mga_ioc32.c b/linux-core/mga_ioc32.c
index 390bb2e6..bc745cfa 100644
--- a/linux-core/mga_ioc32.c
+++ b/linux-core/mga_ioc32.c
@@ -122,7 +122,7 @@ static int compat_mga_getparam(struct file *file, unsigned int cmd,
getparam = compat_alloc_user_space(sizeof(*getparam));
if (!access_ok(VERIFY_WRITE, getparam, sizeof(*getparam))
|| __put_user(getparam32.param, &getparam->param)
- || __put_user(getparam32.value, &getparam->value))
+ || __put_user((void __user *)(unsigned long)getparam32.value, &getparam->value))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
diff --git a/linux-core/r128_ioc32.c b/linux-core/r128_ioc32.c
index b34a0ce2..60598ef9 100644
--- a/linux-core/r128_ioc32.c
+++ b/linux-core/r128_ioc32.c
@@ -122,10 +122,10 @@ static int compat_r128_depth(struct file *file, unsigned int cmd,
if (!access_ok(VERIFY_WRITE, depth, sizeof(*depth))
|| __put_user(depth32.func, &depth->func)
|| __put_user(depth32.n, &depth->n)
- || __put_user(depth32.x, &depth->x)
- || __put_user(depth32.y, &depth->y)
- || __put_user(depth32.buffer, &depth->buffer)
- || __put_user(depth32.mask, &depth->mask))
+ || __put_user((int __user *)(unsigned long)depth32.x, &depth->x)
+ || __put_user((int __user *)(unsigned long)depth32.y, &depth->y)
+ || __put_user((unsigned int __user *)(unsigned long)depth32.buffer, &depth->buffer)
+ || __put_user((unsigned char __user *)(unsigned long)depth32.mask, &depth->mask))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
@@ -148,7 +148,7 @@ static int compat_r128_stipple(struct file *file, unsigned int cmd,
stipple = compat_alloc_user_space(sizeof(*stipple));
if (!access_ok(VERIFY_WRITE, stipple, sizeof(*stipple))
- || __put_user(stipple32.mask, &stipple->mask))
+ || __put_user((unsigned int __user *)(unsigned long)stipple32.mask, &stipple->mask))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
@@ -172,7 +172,7 @@ static int compat_r128_getparam(struct file *file, unsigned int cmd,
getparam = compat_alloc_user_space(sizeof(*getparam));
if (!access_ok(VERIFY_WRITE, getparam, sizeof(*getparam))
|| __put_user(getparam32.param, &getparam->param)
- || __put_user(getparam32.value, &getparam->value))
+ || __put_user((void __user *)(unsigned long)getparam32.value, &getparam->value))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,