From: Vasily Averin Date: Sun, 12 Nov 2017 19:28:46 +0000 (+0300) Subject: netdev: exit_net cleanup check added X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ee21b18b6bdbb17a6e0b26255d2f662baf0d8409;p=openwrt%2Fstaging%2Fblogic.git netdev: exit_net cleanup check added Be sure that dev_base_head list initialized in net_init hook was return to initial state Signed-off-by: Vasily Averin Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 30b5fe32c525..658337bf33e4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8667,6 +8667,8 @@ static void __net_exit netdev_exit(struct net *net) { kfree(net->dev_name_head); kfree(net->dev_index_head); + if (net != &init_net) + WARN_ON_ONCE(!list_empty(&net->dev_base_head)); } static struct pernet_operations __net_initdata netdev_net_ops = {