diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec3081ab04c0..3e0692fd6282 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4044,6 +4044,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); @@ -4051,6 +4052,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(); }