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

netdev: exit_net cleanup check added

Be sure that dev_base_head list initialized in net_init hook was return
to initial state
Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0e4ec5ac
...@@ -8667,6 +8667,8 @@ static void __net_exit netdev_exit(struct net *net) ...@@ -8667,6 +8667,8 @@ static void __net_exit netdev_exit(struct net *net)
{ {
kfree(net->dev_name_head); kfree(net->dev_name_head);
kfree(net->dev_index_head); kfree(net->dev_index_head);
if (net != &init_net)
WARN_ON_ONCE(!list_empty(&net->dev_base_head));
} }
static struct pernet_operations __net_initdata netdev_net_ops = { static struct pernet_operations __net_initdata netdev_net_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册