* [PATCH] ext4/ioctl.c: copy_{from,to}_user expect __user pointers
@ 2011-09-23 22:25 H Hartley Sweeten
2011-10-12 3:10 ` Ted Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2011-09-23 22:25 UTC (permalink / raw)
To: Linux Kernel; +Cc: linux-ext4, tytso, adilger.kernel
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>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
---
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index f18bfe3..43759b1 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -348,7 +348,7 @@ mext_out:
if (!blk_queue_discard(q))
return -EOPNOTSUPP;
- if (copy_from_user(&range, (struct fstrim_range *)arg,
+ if (copy_from_user(&range, (struct fstrim_range __user *)arg,
sizeof(range)))
return -EFAULT;
@@ -358,7 +358,7 @@ mext_out:
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4/ioctl.c: copy_{from,to}_user expect __user pointers
2011-09-23 22:25 [PATCH] ext4/ioctl.c: copy_{from,to}_user expect __user pointers H Hartley Sweeten
@ 2011-10-12 3:10 ` Ted Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2011-10-12 3:10 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, linux-ext4, adilger.kernel
On Fri, Sep 23, 2011 at 03:25:54PM -0700, H Hartley Sweeten wrote:
> 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>
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-12 3:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 22:25 [PATCH] ext4/ioctl.c: copy_{from,to}_user expect __user pointers H Hartley Sweeten
2011-10-12 3:10 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox