From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@openvz.org" <devel@openvz.org>
Subject: Re: [PATCH] SUNRPC: return negative value in case rpcbind client creation error
Date: Tue, 31 Jul 2012 11:46:33 +0400 [thread overview]
Message-ID: <50178D59.7010103@parallels.com> (raw)
In-Reply-To: <1343689924.8362.4.camel@lade.trondhjem.org>
31.07.2012 03:12, Myklebust, Trond пишет:
> On Fri, 2012-07-20 at 15:57 +0400, Stanislav Kinsbursky wrote:
>> Without this patch kernel will panic on LockD start, because lockd_up() checks
>> lockd_up_net() result for negative value.
>> >From my pow it's better to return negative value from rpcbind routines instead
>> of replacing all such checks like in lockd_up().
>>
>> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
>> ---
>> net/sunrpc/rpcb_clnt.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
>> index 92509ff..a70acae 100644
>> --- a/net/sunrpc/rpcb_clnt.c
>> +++ b/net/sunrpc/rpcb_clnt.c
>> @@ -251,7 +251,7 @@ static int rpcb_create_local_unix(struct net *net)
>> if (IS_ERR(clnt)) {
>> dprintk("RPC: failed to create AF_LOCAL rpcbind "
>> "client (errno %ld).\n", PTR_ERR(clnt));
>> - result = -PTR_ERR(clnt);
>> + result = PTR_ERR(clnt);
>> goto out;
>> }
>>
>> @@ -298,7 +298,7 @@ static int rpcb_create_local_net(struct net *net)
>> if (IS_ERR(clnt)) {
>> dprintk("RPC: failed to create local rpcbind "
>> "client (errno %ld).\n", PTR_ERR(clnt));
>> - result = -PTR_ERR(clnt);
>> + result = PTR_ERR(clnt);
>> goto out;
>> }
>
> Who is supposed to carry this patch? Is it Bruce or is it me?
>
I don't know, Trond. It's up to you and Bruce.
This is a bug fix and the bug is very old. The only reason, why it was found
just now, is that all the callers of these functions were checking the result
for zero.
And I agreed with Bruce, that is have to marked for stable branches (at least
for 3.4-3.5 kernels).
--
Best regards,
Stanislav Kinsbursky
prev parent reply other threads:[~2012-07-31 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 11:57 [PATCH] SUNRPC: return negative value in case rpcbind client creation error Stanislav Kinsbursky
2012-07-30 23:12 ` Myklebust, Trond
2012-07-30 23:23 ` bfields
2012-07-31 7:46 ` Stanislav Kinsbursky [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=50178D59.7010103@parallels.com \
--to=skinsbursky@parallels.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=devel@openvz.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 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).