projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92d7c74
)
xfrm: fix gro_cells leak when remove virtual xfrm interfaces
author
Li RongQing
<lirongqing@baidu.com>
Sun, 30 Sep 2018 07:06:06 +0000
(15:06 +0800)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Tue, 2 Oct 2018 06:11:45 +0000
(08:11 +0200)
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>
net/xfrm/xfrm_interface.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_interface.c
b/net/xfrm/xfrm_interface.c
index 31acc6f33d98929ec2be31b0aec0469b4d5551fb..6f05e831a73e5c1e20e70c6d6c8102e537f1cb71 100644
(file)
--- 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);
}