summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2017-11-12 22:28:46 +0300
committerDavid S. Miller <davem@davemloft.net>2017-11-14 15:45:53 +0900
commitee21b18b6bdbb17a6e0b26255d2f662baf0d8409 (patch)
treea4e5dbc8fe2c0f392237d054383b6712424bd9e7 /net/core
parent0e4ec5acad8b9dde5a42c37ae3499f7d0f230e75 (diff)
downloadlinux-stable-ee21b18b6bdbb17a6e0b26255d2f662baf0d8409.tar.gz
linux-stable-ee21b18b6bdbb17a6e0b26255d2f662baf0d8409.tar.bz2
linux-stable-ee21b18b6bdbb17a6e0b26255d2f662baf0d8409.zip
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 <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
1 files changed, 2 insertions, 0 deletions
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 = {