diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 4e14926433ed..9770e08c7e02 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3966,6 +3966,7 @@ static inline void netif_tx_disable(struct net_device *dev) local_bh_disable(); cpu = smp_processor_id(); + spin_lock(&dev->tx_global_lock); for (i = 0; i < dev->num_tx_queues; i++) { struct netdev_queue *txq = netdev_get_tx_queue(dev, i); @@ -3973,6 +3974,7 @@ static inline void netif_tx_disable(struct net_device *dev) netif_tx_stop_queue(txq); __netif_tx_unlock(txq); } + spin_unlock(&dev->tx_global_lock); local_bh_enable(); }