summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-01-08 09:31:13 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-01 10:13:47 -0500
commit3dc0da278e2b26fa8e353b3a962b2c89e184d353 (patch)
tree1d1015dfca92b1cd9fbd42baeb0e8b1f3a66730c /net/sunrpc
parent1b092092bf0e2e8b7af1c2a03f615b4e60b05d47 (diff)
downloadlinux-3dc0da278e2b26fa8e353b3a962b2c89e184d353.tar.gz
linux-3dc0da278e2b26fa8e353b3a962b2c89e184d353.tar.bz2
linux-3dc0da278e2b26fa8e353b3a962b2c89e184d353.zip
SUNRPC: Fix an RCU dereference in xs_local_rpcbind
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtsock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 1897181d7438..f7d6e4f8c162 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1731,7 +1731,9 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock)
*/
static void xs_local_rpcbind(struct rpc_task *task)
{
- xprt_set_bound(task->tk_xprt);
+ rcu_read_lock();
+ xprt_set_bound(rcu_dereference(task->tk_client->cl_xprt));
+ rcu_read_unlock();
}
static void xs_local_set_port(struct rpc_xprt *xprt, unsigned short port)