projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9204d9
)
[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.
author
David S. Miller
<davem@sunset.davemloft.net>
Thu, 7 Dec 2006 07:45:15 +0000
(23:45 -0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Thu, 7 Dec 2006 07:45:15 +0000
(23:45 -0800)
We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().
Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/xfrm4_policy.c
patch
|
blob
|
history
diff --git
a/net/ipv4/xfrm4_policy.c
b/net/ipv4/xfrm4_policy.c
index d4107bb701b58ba4492c68b51d902fb6e286b05a..fb9f69c616f5c3dbf43af6db14a8178aba46419b 100644
(file)
--- a/
net/ipv4/xfrm4_policy.c
+++ b/
net/ipv4/xfrm4_policy.c
@@
-274,6
+274,8
@@
static void xfrm4_dst_destroy(struct dst_entry *dst)
if (likely(xdst->u.rt.idev))
in_dev_put(xdst->u.rt.idev);
+ if (likely(xdst->u.rt.peer))
+ inet_putpeer(xdst->u.rt.peer);
xfrm_dst_destroy(xdst);
}