diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-01 17:00:56 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-02 15:36:38 -0500 |
commit | 2446ab6070861aba2dd9229463ffbc40016a9f33 (patch) | |
tree | 2e366c3236788936b9f4f58c0787ae01c265f4a4 /net/sunrpc/auth_gss | |
parent | a3ca5651cb5eebe2e56e510bbf5cd60abc301c9f (diff) |
SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field
A migration event will replace the rpc_xprt used by an rpc_clnt. To
ensure this can be done safely, all references to cl_xprt must now use
a form of rcu_dereference().
Special care is taken with rpc_peeraddr2str(), which returns a pointer
to memory whose lifetime is the same as the rpc_xprt.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
[ cel: fix lockdep splats and layering violations ]
[ cel: forward ported to 3.4 ]
[ cel: remove rpc_max_reqs(), add rpc_net_ns() ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index cb2e56452748..d3ad81f8da5b 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -799,7 +799,7 @@ err_unlink_pipe_1: | |||
799 | static void gss_pipes_dentries_destroy_net(struct rpc_clnt *clnt, | 799 | static void gss_pipes_dentries_destroy_net(struct rpc_clnt *clnt, |
800 | struct rpc_auth *auth) | 800 | struct rpc_auth *auth) |
801 | { | 801 | { |
802 | struct net *net = clnt->cl_xprt->xprt_net; | 802 | struct net *net = rpc_net_ns(clnt); |
803 | struct super_block *sb; | 803 | struct super_block *sb; |
804 | 804 | ||
805 | sb = rpc_get_sb_net(net); | 805 | sb = rpc_get_sb_net(net); |
@@ -813,7 +813,7 @@ static void gss_pipes_dentries_destroy_net(struct rpc_clnt *clnt, | |||
813 | static int gss_pipes_dentries_create_net(struct rpc_clnt *clnt, | 813 | static int gss_pipes_dentries_create_net(struct rpc_clnt *clnt, |
814 | struct rpc_auth *auth) | 814 | struct rpc_auth *auth) |
815 | { | 815 | { |
816 | struct net *net = clnt->cl_xprt->xprt_net; | 816 | struct net *net = rpc_net_ns(clnt); |
817 | struct super_block *sb; | 817 | struct super_block *sb; |
818 | int err = 0; | 818 | int err = 0; |
819 | 819 | ||