All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: akpm@linux-foundation.org, James.Bottomley@HansenPartnership.com,
	linux-scsi@vger.kernel.org, alexey.zaytsev@gmail.com,
	dgilbert@interlog.com
Subject: Re: [patch 4/7] sg_io: don't perform unneeded copy in compat code
Date: Thu, 11 Jun 2009 12:53:37 +0200	[thread overview]
Message-ID: <20090611105337.GM11363@kernel.dk> (raw)
In-Reply-To: <20090611193102F.fujita.tomonori@lab.ntt.co.jp>

On Thu, Jun 11 2009, FUJITA Tomonori wrote:
> On Wed, 10 Jun 2009 12:56:56 -0700
> akpm@linux-foundation.org wrote:
> 
> > From: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> > 
> > The members from 'status' in struct sg_io_hdr to the last are used to
> > transfer information from kernel to user space.  The values that user
> > space sets are just ignored.
> > 
> > Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> > Cc: Douglas Gilbert <dgilbert@interlog.com>
> > Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> > Cc: Jens Axboe <jens.axboe@oracle.com>
> > Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  fs/compat_ioctl.c |    6 ------
> >  1 file changed, 6 deletions(-)
> > 
> > diff -puN fs/compat_ioctl.c~sg_io-dont-perform-unneeded-copy-in-compat-code fs/compat_ioctl.c
> > --- a/fs/compat_ioctl.c~sg_io-dont-perform-unneeded-copy-in-compat-code
> > +++ a/fs/compat_ioctl.c
> > @@ -787,12 +787,6 @@ static int sg_ioctl_trans(unsigned int f
> >  	if (put_user(compat_ptr(data), &sgio->usr_ptr))
> >  		return -EFAULT;
> >  
> > -	if (copy_in_user(&sgio->status, &sgio32->status,
> > -			 (4 * sizeof(unsigned char)) +
> > -			 (2 * sizeof(unsigned short)) +
> > -			 (3 * sizeof(int))))
> > -		return -EFAULT;
> > -
> >  	err = sys_ioctl(fd, cmd, (unsigned long) sgio);
> >  
> >  	if (err >= 0) {
> 
> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Ditto from me.

Acked-by: Jens Axboe <jens.axboe@oracle.com>

-- 
Jens Axboe


      reply	other threads:[~2009-06-11 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 19:56 [patch 4/7] sg_io: don't perform unneeded copy in compat code akpm
2009-06-11 10:31 ` FUJITA Tomonori
2009-06-11 10:53   ` Jens Axboe [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=20090611105337.GM11363@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexey.zaytsev@gmail.com \
    --cc=dgilbert@interlog.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-scsi@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 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.