提交 4da40259 编写于 作者: L Li RongQing 提交者: Steffen Klassert

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: f203b76d ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: NZhang Yu <zhangyu31@baidu.com>
Signed-off-by: NLi RongQing <lirongqing@baidu.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 92d7c74b
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册