Explorar el Código

ppp: exit_net cleanup checks added

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>
Vasily Averin hace 7 años
padre
commit
e6675000f9
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      drivers/net/ppp/ppp_generic.c

+ 2 - 0
drivers/net/ppp/ppp_generic.c

@@ -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 = {