提交 baeb0dbb 编写于 作者: V Vasily Averin 提交者: David S. Miller

xfrm6_tunnel: exit_net cleanup check added

Be sure that spi_byaddr and spi_byspi arrays initialized in net_init hook
were return to initial state
Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e6675000
...@@ -338,6 +338,14 @@ static int __net_init xfrm6_tunnel_net_init(struct net *net) ...@@ -338,6 +338,14 @@ static int __net_init xfrm6_tunnel_net_init(struct net *net)
static void __net_exit xfrm6_tunnel_net_exit(struct net *net) static void __net_exit xfrm6_tunnel_net_exit(struct net *net)
{ {
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
unsigned int i;
for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++)
WARN_ON_ONCE(!hlist_empty(&xfrm6_tn->spi_byaddr[i]));
for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++)
WARN_ON_ONCE(!hlist_empty(&xfrm6_tn->spi_byspi[i]));
} }
static struct pernet_operations xfrm6_tunnel_net_ops = { static struct pernet_operations xfrm6_tunnel_net_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册