From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: ext-jani.1.nikula@nokia.com, bfields@fieldses.org, neilb@suse.de,
davem@davemloft.net, batsakis@netapp.com, bhalevy@panasas.com,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] sunrpc: fix error path - actually return ERR_PTR() on error
Date: Fri, 12 Mar 2010 10:09:51 -0500 [thread overview]
Message-ID: <1268406591.3156.18.camel@localhost.localdomain> (raw)
In-Reply-To: <201003122314.IAD17160.OtJLHVMFOOSFFQ@I-love.SAKURA.ne.jp>
On Fri, 2010-03-12 at 23:14 +0900, Tetsuo Handa wrote:
> Jani Nikula wrote:
> > Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
> >
> > ---
> >
> > NOTE: I'm afraid I'm unable to test this; please consider this more a
> > bug report than a complete patch.
> > ---
> Indeed, it has to be "return ERR_PTR(-EINVAL);".
> Otherwise, it will trigger NULL pointer dereference some lines later.
>
> bc_sock = container_of(args->bc_xprt, struct svc_sock, sk_xprt);
> bc_sock->sk_bc_xprt = xprt;
>
> This bug was introduced by f300baba5a1536070d6d77bf0c8c4ca999bb4f0f
> "nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel" and
> exists in 2.6.32 and later.
Or it should just be dropped. I don't see any reason why nfsd should be
trying to set up a callback channel if it doesn't already know that it
has a socket. Returning an error value in that case would just be
papering over a design bug.
Trond
next prev parent reply other threads:[~2010-03-12 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 13:48 [PATCH] sunrpc: fix error path - actually return ERR_PTR() on error Jani Nikula
2010-03-12 14:14 ` Tetsuo Handa
2010-03-12 15:09 ` Trond Myklebust [this message]
[not found] ` <1268406591.3156.18.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-12 20:35 ` J. Bruce Fields
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=1268406591.3156.18.camel@localhost.localdomain \
--to=trond.myklebust@netapp.com \
--cc=akpm@linux-foundation.org \
--cc=batsakis@netapp.com \
--cc=bfields@fieldses.org \
--cc=bhalevy@panasas.com \
--cc=davem@davemloft.net \
--cc=ext-jani.1.nikula@nokia.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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