]> git.itanic.dy.fi Git - linux-stable/commit
net: ip6mr: fix static mfc/dev leaks on table destruction
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 20 Nov 2015 12:54:20 +0000 (13:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 05:24:31 +0000 (21:24 -0800)
commit0c3c060bbdaaced093f3a2ab43b30a8038fa1476
treeb9cbd3d93cdfdad93ce4435ef53aefb399e469e5
parent3621421a35c3070ab86741f2e7ac8da635f79980
net: ip6mr: fix static mfc/dev leaks on table destruction

[ Upstream commit 4c6980462f32b4f282c5d8e5f7ea8070e2937725 ]

Similar to ipv4, when destroying an mrt table the static mfc entries and
the static devices are kept, which leads to devices that can never be
destroyed (because of refcnt taken) and leaked memory. Make sure that
everything is cleaned up on netns destruction.

Fixes: 8229efdaef1e ("netns: ip6mr: enable namespace support in ipv6 multicast forwarding code")
CC: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6mr.c