ppp: exit_net cleanup checks added
authorVasily Averin <vvs@virtuozzo.com>
Sun, 12 Nov 2017 19:33:22 +0000 (22:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Nov 2017 06:46:17 +0000 (15:46 +0900)
Be sure that lists initialized in net_init hook were return
to initial state.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/ppp_generic.c

index 44891335f9afeb5b5bca5d7ed1ad4219d4c40186..d8e5747ff4e32e9bf0c221e88345fd27c60b0e5f 100644 (file)
@@ -962,6 +962,8 @@ static __net_exit void ppp_exit_net(struct net *net)
 
        mutex_destroy(&pn->all_ppp_mutex);
        idr_destroy(&pn->units_idr);
+       WARN_ON_ONCE(!list_empty(&pn->all_channels));
+       WARN_ON_ONCE(!list_empty(&pn->new_channels));
 }
 
 static struct pernet_operations ppp_net_ops = {