geneve: move debug check after netdev unregister
authorFlorian Westphal <fw@strlen.de>
Sat, 14 Mar 2020 07:18:42 +0000 (08:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:31 +0000 (11:01 +0200)
commit6fe31c7ce0edfbd4e207125c4b0a8a162180b6da
treef39e296c30235c271df8814d12a8f4de2aaf9bd7
parentb5c9652ada33f39d47be7c502df72b14a1c95e9e
geneve: move debug check after netdev unregister

[ Upstream commit 0fda7600c2e174fe27e9cf02e78e345226e441fa ]

The debug check must be done after unregister_netdevice_many() call --
the list_del() for this is done inside .ndo_stop.

Fixes: 2843a25348f8 ("geneve: speedup geneve tunnels dismantle")
Reported-and-tested-by: <syzbot+68a8ed58e3d17c700de5@syzkaller.appspotmail.com>
Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/geneve.c