[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110309164844.decd835f.akpm@linux-foundation.org>
Date: Wed, 9 Mar 2011 16:48:44 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kernel Testers List <kernel-testers@...r.kernel.org>,
Maciej Rutecki <maciej.rutecki@...il.com>,
Florian Mickler <florian@...kler.org>,
"Ben Hutchings" <bhutchings@...arflare.com>,
"Pavel Emelyanov" <xemul@...allels.com>, linux-nfs@...r.kernel.org,
Trond Myklebust <trond.myklebust@....uio.no>,
"J. Bruce Fields" <bfields@...ldses.org>,
David Miller <davem@...emloft.net>
Subject: Re: [Bug #30322] BUG in xs_tcp_setup_socket
On Sun, 6 Mar 2011 13:40:43 +0100 (CET)
"Rafael J. Wysocki" <rjw@...k.pl> wrote:
> This message has been generated automatically as a part of a report
> of regressions introduced between 2.6.36 and 2.6.37.
>
> The following bug entry is on the current list of known regressions
> introduced between 2.6.36 and 2.6.37. Please verify if it still should
> be listed and let the tracking team know (either way).
>
>
> Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=30322
> Subject : BUG in xs_tcp_setup_socket
> Submitter : Ben Hutchings <bhutchings@...arflare.com>
> Date : 2011-03-01 20:34 (6 days old)
> Patch : http://article.gmane.org/gmane.linux.nfs/38949
>
Ben's patch is a no-brainer but it is not yet in mainline or linux-next.
I'm not on linux-nfs so I recreated it as below.
Subject: sunrpc: propagate errors from xs_bind() through xs_create_sock()
From: Ben Hutchings <bhutchings@...arflare.com>
xs_create_sock() is supposed to return a pointer or an ERR_PTR-encoded
error, but it currently returns 0 if xs_bind() fails. This causes the
kernel to go BUG, as described in
https://bugzilla.kernel.org/show_bug.cgi?id=30322.
Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
Cc: David Miller <davem@...emloft.net>
Cc: Trond Myklebust <trond.myklebust@....uio.no>
Cc: "J. Bruce Fields" <bfields@...ldses.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Maciej Rutecki <maciej.rutecki@...il.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
net/sunrpc/xprtsock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN net/sunrpc/xprtsock.c~sunrpc-propagate-errors-from-xs_bind-through-xs_create_sock net/sunrpc/xprtsock.c
--- a/net/sunrpc/xprtsock.c~sunrpc-propagate-errors-from-xs_bind-through-xs_create_sock
+++ a/net/sunrpc/xprtsock.c
@@ -1631,7 +1631,8 @@ static struct socket *xs_create_sock(str
}
xs_reclassify_socket(family, sock);
- if (xs_bind(transport, sock)) {
+ err = xs_bind(transport, sock);
+ if (err) {
sock_release(sock);
goto out;
}
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists