diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-12 22:28:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-14 09:45:52 +0300 |
commit | 0e4ec5acad8b9dde5a42c37ae3499f7d0f230e75 (patch) | |
tree | 8ce7da7014ffb9315b3f6c04028e3f0c076e13c1 /drivers | |
parent | 669f8f1a5c6849d4522de4038c8d1a3e09fcc4ce (diff) | |
download | linux-0e4ec5acad8b9dde5a42c37ae3499f7d0f230e75.tar.xz |
vxlan: exit_net cleanup checks added
Be sure that sock_list array 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 'drivers')
-rw-r--r-- | drivers/net/vxlan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d7c49cf1d5e9..c02d85651eba 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3704,6 +3704,7 @@ static void __net_exit vxlan_exit_net(struct net *net) struct vxlan_net *vn = net_generic(net, vxlan_net_id); struct vxlan_dev *vxlan, *next; struct net_device *dev, *aux; + unsigned int h; LIST_HEAD(list); rtnl_lock(); @@ -3723,6 +3724,9 @@ static void __net_exit vxlan_exit_net(struct net *net) unregister_netdevice_many(&list); rtnl_unlock(); + + for (h = 0; h < PORT_HASH_SIZE; ++h) + WARN_ON_ONCE(!hlist_empty(&vn->sock_list[h])); } static struct pernet_operations vxlan_net_ops = { |