diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c3da0e1ea9d..9de5312edeb8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4313,6 +4313,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); @@ -4320,6 +4321,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(); }