All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] fs: nfsd: remove calls to simple_strtoll
Date: Sun, 27 Oct 2013 08:09:53 -0700	[thread overview]
Message-ID: <20131027150952.GA4801@fifo99.com> (raw)
In-Reply-To: <20131026184124.GA17487@fieldses.org>

On Sat, Oct 26, 2013 at 02:41:24PM -0400, J. Bruce Fields wrote:
> On Fri, Oct 25, 2013 at 07:33:12PM -0700, Daniel Walker wrote:
> > Signed-off-by: Daniel Walker <dwalker@fifo99.com>
> > ---
> >  fs/nfsd/fault_inject.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/fs/nfsd/fault_inject.c b/fs/nfsd/fault_inject.c
> > index d620e7f..41165f0 100644
> > --- a/fs/nfsd/fault_inject.c
> > +++ b/fs/nfsd/fault_inject.c
> > @@ -125,20 +125,24 @@ static ssize_t fault_inject_write(struct file *file, const char __user *buf,
> >  	size_t size = min(sizeof(write_buf) - 1, len);
> >  	struct net *net = current->nsproxy->net_ns;
> >  	struct sockaddr_storage sa;
> > +	int ret = -EFAULT;
> >  	u64 val;
> >  
> >  	if (copy_from_user(write_buf, buf, size))
> > -		return -EFAULT;
> > +		return ret;
> >  	write_buf[size] = '\0';
> >  
> >  	size = rpc_pton(net, write_buf, size, (struct sockaddr *)&sa, sizeof(sa));
> >  	if (size > 0)
> >  		nfsd_inject_set_client(file_inode(file)->i_private, &sa, size);
> 
> If we take this branch, don't we end up returning -EFAULT below?
> 


Looks like it .. I wasn't try to change that behavior, I'll update the
patch and resend.

Daniel

      reply	other threads:[~2013-10-27 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-26  2:33 [PATCH 2/3] fs: nfsd: remove calls to simple_strtoll Daniel Walker
2013-10-26 18:41 ` J. Bruce Fields
2013-10-27 15:09   ` Daniel Walker [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=20131027150952.GA4801@fifo99.com \
    --to=dwalker@fifo99.com \
    --cc=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@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.