diff options
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index f91fd51b32e3..d84e7058c298 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -1800,7 +1800,7 @@ struct space_resv_32 { | |||
1800 | /* just account for different alignment */ | 1800 | /* just account for different alignment */ |
1801 | static int compat_ioctl_preallocate(struct file *file, unsigned long arg) | 1801 | static int compat_ioctl_preallocate(struct file *file, unsigned long arg) |
1802 | { | 1802 | { |
1803 | struct space_resv_32 __user *p32 = (void __user *)arg; | 1803 | struct space_resv_32 __user *p32 = compat_ptr(arg); |
1804 | struct space_resv __user *p = compat_alloc_user_space(sizeof(*p)); | 1804 | struct space_resv __user *p = compat_alloc_user_space(sizeof(*p)); |
1805 | 1805 | ||
1806 | if (copy_in_user(&p->l_type, &p32->l_type, sizeof(s16)) || | 1806 | if (copy_in_user(&p->l_type, &p32->l_type, sizeof(s16)) || |
@@ -2802,7 +2802,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | |||
2802 | #else | 2802 | #else |
2803 | case FS_IOC_RESVSP: | 2803 | case FS_IOC_RESVSP: |
2804 | case FS_IOC_RESVSP64: | 2804 | case FS_IOC_RESVSP64: |
2805 | error = ioctl_preallocate(filp, (void __user *)arg); | 2805 | error = ioctl_preallocate(filp, compat_ptr(arg)); |
2806 | goto out_fput; | 2806 | goto out_fput; |
2807 | #endif | 2807 | #endif |
2808 | 2808 | ||