1 From: Trond Myklebust <Trond.Myklebust@netapp.com>
2 Subject: SUNRPC: Fix an Oops due to socket not set up yet...
4 Patch-mainline: v2.6.29-rc7
6 Upstream commit fba91afbec2c004e2c8733ae9e0ca6998e962c64
8 SUNRPC: Fix an Oops due to socket not set up yet...
10 We can Oops in both xs_udp_send_request() and xs_tcp_send_request() if the
11 call to xs_sendpages() returns an error due to the socket not yet being
13 Deal with that situation by returning a new error: ENOTSOCK, so that we
14 know to avoid dereferencing transport->sock.
16 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
20 Index: linux-2.6.27-SLE11_BRANCH/net/sunrpc/xprtsock.c
21 ===================================================================
22 --- linux-2.6.27-SLE11_BRANCH.orig/net/sunrpc/xprtsock.c
23 +++ linux-2.6.27-SLE11_BRANCH/net/sunrpc/xprtsock.c
24 @@ -469,7 +469,7 @@ static int xs_sendpages(struct socket *s
31 clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags);
33 @@ -596,6 +596,10 @@ static int xs_udp_send_request(struct rp
39 + /* Should we call xs_close() here? */
44 @@ -695,6 +699,10 @@ static int xs_tcp_send_request(struct rp
50 + /* Should we call xs_close() here? */