aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2017-11-12 14:32:47 -0500
committerDavid S. Miller <davem@davemloft.net>2017-11-14 01:45:53 -0500
commitae61e8cd061d6ce9a2e2a13e081e7d936139e01e (patch)
tree12fdc6cdf77a987b630a3223103e146cd4a5aaca
parent1e7af3b2cdf2dc9e4fd86c799414b3c504975270 (diff)
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>
-rw-r--r--net/phonet/pn_dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 2cb4c5dfad6f..77787512fc32 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -331,7 +331,10 @@ static int __net_init phonet_init_net(struct net *net)
331 331
332static void __net_exit phonet_exit_net(struct net *net) 332static void __net_exit phonet_exit_net(struct net *net)
333{ 333{
334 struct phonet_net *pnn = phonet_pernet(net);
335
334 remove_proc_entry("phonet", net->proc_net); 336 remove_proc_entry("phonet", net->proc_net);
337 WARN_ON_ONCE(!list_empty(&pnn->pndevs.list));
335} 338}
336 339
337static struct pernet_operations phonet_net_ops = { 340static struct pernet_operations phonet_net_ops = {