aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/vxlan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 767f7af3bd40..2c15f6c86502 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1794,7 +1794,8 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head)
1794 struct vxlan_dev *vxlan = netdev_priv(dev); 1794 struct vxlan_dev *vxlan = netdev_priv(dev);
1795 1795
1796 spin_lock(&vn->sock_lock); 1796 spin_lock(&vn->sock_lock);
1797 hlist_del_rcu(&vxlan->hlist); 1797 if (!hlist_unhashed(&vxlan->hlist))
1798 hlist_del_rcu(&vxlan->hlist);
1798 spin_unlock(&vn->sock_lock); 1799 spin_unlock(&vn->sock_lock);
1799 1800
1800 list_del(&vxlan->next); 1801 list_del(&vxlan->next);