Commit 4da40259 authored by Li RongQing's avatar Li RongQing Committed by 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: default avatarZhang Yu <zhangyu31@baidu.com>
Signed-off-by: default avatarLi RongQing <lirongqing@baidu.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 92d7c74b
...@@ -116,6 +116,9 @@ static void xfrmi_unlink(struct xfrmi_net *xfrmn, struct xfrm_if *xi) ...@@ -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) 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); free_percpu(dev->tstats);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment