[Devel] [PATCH RHEL7 COMMIT] net: udpv6: release memcg on destroy

Konstantin Khorenko khorenko at virtuozzo.com
Thu Sep 3 02:17:57 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.6
------>
commit b9643707fb3f7e18c9681e14c7184d0aa17110a9
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Thu Sep 3 13:17:57 2015 +0400

    net: udpv6: release memcg on destroy
    
    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 4d3754d..780e823 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);
 }
 
 /*



More information about the Devel mailing list