projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d4b69d
)
SUNRPC: Add correct rcu_dereference annotation in rpc_clnt_set_transport
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 28 Oct 2013 20:42:44 +0000
(16:42 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 28 Oct 2013 20:46:37 +0000
(16:46 -0400)
rpc_clnt_set_transport should use rcu_derefence_protected(), as it is
only safe to be called with the rpc_clnt::cl_lock held.
Cc: Chuck Lever <Chuck.Lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/clnt.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/clnt.c
b/net/sunrpc/clnt.c
index f167d9c8d7dd95d7369a3f5ceda40878096d1834..759b78b056a77679de85014c21c3ccd8e996e22d 100644
(file)
--- a/
net/sunrpc/clnt.c
+++ b/
net/sunrpc/clnt.c
@@
-272,7
+272,8
@@
static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
struct rpc_xprt *old;
spin_lock(&clnt->cl_lock);
- old = clnt->cl_xprt;
+ old = rcu_dereference_protected(clnt->cl_xprt,
+ lockdep_is_held(&clnt->cl_lock));
if (!xprt_bound(xprt))
clnt->cl_autobind = 1;