linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	linux-ext4@vger.kernel.org, jack@suse.cz,
	akpm@linux-foundation.org, adilger.kernel@dilger.ca
Subject: Re: [PATCH] ext3/ioctl.c: quite sparse warnings about different address spaces
Date: Mon, 13 Jun 2011 15:47:04 +0200	[thread overview]
Message-ID: <20110613134704.GD4907@quack.suse.cz> (raw)
In-Reply-To: <201106101459.06129.hartleys@visionengravers.com>

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

      reply	other threads:[~2011-06-13 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110613134704.GD4907@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=hartleys@visionengravers.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).