浏览代码

phonet: exit_net cleanup check added

Be sure that pndevs.list initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vasily Averin 7 年之前
父节点
当前提交
ae61e8cd06
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/phonet/pn_dev.c

+ 3 - 0
net/phonet/pn_dev.c

@@ -331,7 +331,10 @@ static int __net_init phonet_init_net(struct net *net)
 
 static void __net_exit phonet_exit_net(struct net *net)
 {
+	struct phonet_net *pnn = phonet_pernet(net);
+
 	remove_proc_entry("phonet", net->proc_net);
+	WARN_ON_ONCE(!list_empty(&pnn->pndevs.list));
 }
 
 static struct pernet_operations phonet_net_ops = {