]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix an Oops due to socket not set up yet...
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Mar 2009 18:06:41 +0000 (14:06 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Mar 2009 18:06:41 +0000 (14:06 -0400)
commit0a4df38182910ac123a7ed4faa03548d372fc5f9
tree025d7c07b8d41d4e5752fb9da7396a0b596856da
parent25b52bce35062ed4d4340e857c5890f6b1a9cc1e
SUNRPC: Fix an Oops due to socket not set up yet...

We can Oops in both xs_udp_send_request() and xs_tcp_send_request() if the
call to xs_sendpages() returns an error due to the socket not yet being
set up.
Deal with that situation by returning a new error: ENOTSOCK, so that we
know to avoid dereferencing transport->sock.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c