diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c index f4090bd2f345218df867b618806569415c1de688..c7f43944f160e080973ce449a6c97a4bc2a4d2bc 100644 --- a/fs/ext3/ioctl.c +++ b/fs/ext3/ioctl.c @@ -285,7 +285,7 @@ long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; - if (copy_from_user(&range, (struct fstrim_range *)arg, + if (copy_from_user(&range, (struct fstrim_range __user *)arg, sizeof(range))) return -EFAULT; @@ -293,7 +293,7 @@ long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (ret < 0) return ret; - if (copy_to_user((struct fstrim_range *)arg, &range, + if (copy_to_user((struct fstrim_range __user *)arg, &range, sizeof(range))) return -EFAULT;