[Devel] [PATCH rh7] net: udpv6: release memcg on destroy
Vladimir Davydov
vdavydov at parallels.com
Wed Aug 26 03:56:33 PDT 2015
In case of udpv6 we never release the memcg reference taken in
udpv6_prot->init. This leads to memcg leak. Fix it by calling
sock_release_memcg from udpv6_prot->destroy.
https://jira.sw.ru/browse/PSBM-39084
Fixes: ee3396bb65bf ("udp: Charge ingress buffers into cg memory")
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
net/ipv6/udp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 4d3754df8737..780e823f9142 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1352,6 +1352,7 @@ void udpv6_destroy_sock(struct sock *sk)
}
inet6_destroy_sock(sk);
+ sock_release_memcg(sk);
}
/*
--
2.1.4
More information about the Devel
mailing list