diff options
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
| -rw-r--r-- | net/openvswitch/vport-netdev.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index b327368a3848..6b0190b987ec 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c @@ -180,9 +180,13 @@ void ovs_netdev_tunnel_destroy(struct vport *vport)  	if (vport->dev->priv_flags & IFF_OVS_DATAPATH)  		ovs_netdev_detach_dev(vport); -	/* Early release so we can unregister the device */ +	/* We can be invoked by both explicit vport deletion and +	 * underlying netdev deregistration; delete the link only +	 * if it's not already shutting down. +	 */ +	if (vport->dev->reg_state == NETREG_REGISTERED) +		rtnl_delete_link(vport->dev);  	dev_put(vport->dev); -	rtnl_delete_link(vport->dev);  	vport->dev = NULL;  	rtnl_unlock();  | 
