All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext3/ioctl.c: quite sparse warnings about different address spaces
@ 2011-06-10 21:59 H Hartley Sweeten
  2011-06-13 13:47 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2011-06-10 21:59 UTC (permalink / raw)
  To: Linux Kernel; +Cc: linux-ext4, jack, akpm, adilger.kernel

The 'from' argument for copy_from_user and the 'to' argument for
copy_to_user should both be tagged as __user address space.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>

---

diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
index f4090bd..c7f4394 100644
--- a/fs/ext3/ioctl.c
+++ b/fs/ext3/ioctl.c
@@ -285,7 +285,7 @@ group_add_out:
 		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 @@ group_add_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] ext3/ioctl.c: quite sparse warnings about different address spaces
  2011-06-10 21:59 [PATCH] ext3/ioctl.c: quite sparse warnings about different address spaces H Hartley Sweeten
@ 2011-06-13 13:47 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2011-06-13 13:47 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, linux-ext4, jack, akpm, adilger.kernel

On Fri 10-06-11 14:59:05, H Hartley Sweeten wrote:
> The 'from' argument for copy_from_user and the 'to' argument for
> copy_to_user should both be tagged as __user address space.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
  Thanks. Merged.

								Honza
> 
> ---
> 
> diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
> index f4090bd..c7f4394 100644
> --- a/fs/ext3/ioctl.c
> +++ b/fs/ext3/ioctl.c
> @@ -285,7 +285,7 @@ group_add_out:
>  		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 @@ group_add_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;
>  
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-13 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-10 21:59 [PATCH] ext3/ioctl.c: quite sparse warnings about different address spaces H Hartley Sweeten
2011-06-13 13:47 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.