mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
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: f203b76d78
("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>
This commit is contained in:
parent
92d7c74b6f
commit
4da402597c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user