Be sure that lists initialized in net_init hook were return to initial state

Signed-off-by: Vasily Averin <v...@virtuozzo.com>
---
 drivers/net/ppp/ppp_generic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index e365866..c9791bc 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -960,6 +960,10 @@ static __net_exit void ppp_exit_net(struct net *net)
        rtnl_unlock();
 
        idr_destroy(&pn->units_idr);
+       WARN(!list_empty(&pn->all_channels),
+            "net %p exit: ppp all_channels list is not empty\n", net);
+       WARN(!list_empty(&pn->new_channels),
+            "net %p exit: ppp new_channels list is not empty\n", net);
 }
 
 static struct pernet_operations ppp_net_ops = {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to