projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9091051
)
net :sunrpc :clnt :Fix xps refcount imbalance on the error path
author
Lin Yi
<teroincn@163.com>
Mon, 10 Jun 2019 02:16:56 +0000
(10:16 +0800)
committer
Anna Schumaker
<Anna.Schumaker@Netapp.com>
Fri, 21 Jun 2019 18:43:35 +0000
(14:43 -0400)
rpc_clnt_add_xprt take a reference to struct rpc_xprt_switch, but forget
to release it before return, may lead to a memory leak.
Signed-off-by: Lin Yi <teroincn@163.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/clnt.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/clnt.c
b/net/sunrpc/clnt.c
index 627a87a71f8ba2f90917cf5b7c0a191a476958e4..2b353472364fc61d376099148b588605c955afd9 100644
(file)
--- a/
net/sunrpc/clnt.c
+++ b/
net/sunrpc/clnt.c
@@
-2805,6
+2805,7
@@
int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
xprt = xprt_iter_xprt(&clnt->cl_xpi);
if (xps == NULL || xprt == NULL) {
rcu_read_unlock();
+ xprt_switch_put(xps);
return -EAGAIN;
}
resvport = xprt->resvport;