Skip to content

Commit e6705f7

Browse files
H Hartley Sweetentytso
authored andcommitted
ext4: add __user decoration to calls of copy_{from,to}_user()
This quiets the sparse noise: warning: incorrect type in argument 2 (different address spaces) expected void const [noderef] <asn:1>*from got struct fstrim_range *<noident> warning: incorrect type in argument 1 (different address spaces) expected void [noderef] <asn:1>*to got struct fstrim_range *<noident> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent e0cbee3 commit e6705f7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/ext4/ioctl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
350350
return -EOPNOTSUPP;
351351
}
352352

353-
if (copy_from_user(&range, (struct fstrim_range *)arg,
353+
if (copy_from_user(&range, (struct fstrim_range __user *)arg,
354354
sizeof(range)))
355355
return -EFAULT;
356356

@@ -360,7 +360,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
360360
if (ret < 0)
361361
return ret;
362362

363-
if (copy_to_user((struct fstrim_range *)arg, &range,
363+
if (copy_to_user((struct fstrim_range __user *)arg, &range,
364364
sizeof(range)))
365365
return -EFAULT;
366366

0 commit comments

Comments
 (0)