[bug report] virtio_net: support rx/tx queue reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Xuan Zhuo,

The patch 26ae35c46f93: "virtio_net: support rx/tx queue reset" from
Mar 8, 2022, leads to the following Smatch static checker warning:

	drivers/net/virtio_net.c:1410 virtnet_napi_tx_disable()
	warn: sleeping in atomic context

drivers/net/virtio_net.c
  1829        static int virtnet_tx_vq_reset(struct virtnet_info *vi,
  1830                                       struct send_queue *sq, u32 ring_num)
  1831        {
  1832                struct netdev_queue *txq;
  1833                int err, qindex;
  1834
  1835                qindex = sq - vi->sq;
  1836
  1837                txq = netdev_get_tx_queue(vi->dev, qindex);
  1838                __netif_tx_lock_bh(txq);
                      ^^^^^^^^^^^^^^^^^^^^^^^
Disables preempt

  1839
  1840                /* stop tx queue and napi */
  1841                netif_stop_subqueue(vi->dev, qindex);
  1842                virtnet_napi_tx_disable(&sq->napi);
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
napi_disable() is a might_sleep() function.

  1843
  1844                __netif_tx_unlock_bh(txq);
  1845
  1846                /* reset the queue */
  1847                err = virtio_reset_vq(sq->vq);
  1848                if (err) {
  1849                        netif_start_subqueue(vi->dev, qindex);
  1850                        goto err;
  1851                }

regards,
dan carpenter
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux