aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/xfrm
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2018-09-30 15:06:06 +0800
committerSteffen Klassert <steffen.klassert@secunet.com>2018-10-02 08:11:45 +0200
commit4da402597c2b75c4b636ab2416baf921b363b325 (patch)
tree23d9c6e3732bba551d14caddcfea1bc37fe08ca9 /net/xfrm
parentMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth (diff)
downloadwireguard-linux-4da402597c2b75c4b636ab2416baf921b363b325.tar.xz
wireguard-linux-4da402597c2b75c4b636ab2416baf921b363b325.zip
xfrm: fix gro_cells leak when remove virtual xfrm interfaces
The device gro_cells has been initialized, it should be freed, otherwise it will be leaked Fixes: f203b76d78092faf2 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 31acc6f33d98..6f05e831a73e 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -116,6 +116,9 @@ static void xfrmi_unlink(struct xfrmi_net *xfrmn, struct xfrm_if *xi)
static void xfrmi_dev_free(struct net_device *dev)
{
+ struct xfrm_if *xi = netdev_priv(dev);
+
+ gro_cells_destroy(&xi->gro_cells);
free_percpu(dev->tstats);
}