* [PATCH] SUNRPC: return negative value in case rpcbind client creation error
@ 2012-07-20 11:57 Stanislav Kinsbursky
2012-07-30 23:12 ` Myklebust, Trond
0 siblings, 1 reply; 4+ messages in thread
From: Stanislav Kinsbursky @ 2012-07-20 11:57 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: bfields, linux-nfs, linux-kernel, devel
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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: return negative value in case rpcbind client creation error
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
0 siblings, 2 replies; 4+ messages in thread
From: Myklebust, Trond @ 2012-07-30 23:12 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, devel@openvz.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1458 bytes --]
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?
Cheers
Trond
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: return negative value in case rpcbind client creation error
2012-07-30 23:12 ` Myklebust, Trond
@ 2012-07-30 23:23 ` bfields
2012-07-31 7:46 ` Stanislav Kinsbursky
1 sibling, 0 replies; 4+ messages in thread
From: bfields @ 2012-07-30 23:23 UTC (permalink / raw)
To: Myklebust, Trond
Cc: Stanislav Kinsbursky, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, devel@openvz.org
On Mon, Jul 30, 2012 at 11:12:05PM +0000, Myklebust, Trond wrote:
> 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?
Works either way. Either way--it looks like the bug was introduced with
c526611dd631b2802b6b0221ffb306c5fa25c86c "SUNRPC: Use a cached RPC
client and transport for rpcbind upcalls" and
7402ab19cdd5943c7dd4f3399afe3abda8077ef5 "SUNRPC: Use AF_LOCAL for
rpcbind upcalls"
and should go to stable as well.
(Looks like I said that before but accidentally dropped everyone off the
cc.)
--b.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SUNRPC: return negative value in case rpcbind client creation error
2012-07-30 23:12 ` Myklebust, Trond
2012-07-30 23:23 ` bfields
@ 2012-07-31 7:46 ` Stanislav Kinsbursky
1 sibling, 0 replies; 4+ messages in thread
From: Stanislav Kinsbursky @ 2012-07-31 7:46 UTC (permalink / raw)
To: Myklebust, Trond
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, devel@openvz.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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-31 7:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox