projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
732706a
)
xfrm: put policies when reusing pcpu xdst entry
author
Florian Westphal
<fw@strlen.de>
Mon, 11 Dec 2017 17:23:09 +0000
(18:23 +0100)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Tue, 12 Dec 2017 05:39:05 +0000
(06:39 +0100)
We need to put the policies when re-using the pcpu xdst entry, else
this leaks the reference.
Fixes:
ec30d78c14a813db39a647b6a348b428
("xfrm: add xdst pcpu cache")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c
patch
|
blob
|
blame
|
history
diff --git
a/net/xfrm/xfrm_policy.c
b/net/xfrm/xfrm_policy.c
index 038ec68f6901f0643366f0f3c035a4054aed04b7..70aa5cb0c659d54eacb85f92dc95b2db17bfe1d0 100644
(file)
--- a/
net/xfrm/xfrm_policy.c
+++ b/
net/xfrm/xfrm_policy.c
@@
-1839,6
+1839,7
@@
xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
sizeof(struct xfrm_policy *) * num_pols) == 0 &&
xfrm_xdst_can_reuse(xdst, xfrm, err)) {
dst_hold(&xdst->u.dst);
+ xfrm_pols_put(pols, num_pols);
while (err > 0)
xfrm_state_put(xfrm[--err]);
return xdst;