From: Dan Carpenter <dan.carpenter@oracle.com>
To: xuanzhuo@linux.alibaba.com
Cc: virtualization@lists.linux-foundation.org
Subject: [bug report] virtio_net: support rx/tx queue reset
Date: Thu, 10 Mar 2022 18:12:21 +0300 [thread overview]
Message-ID: <20220310151221.GA2212@kili> (raw)
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@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next reply other threads:[~2022-03-10 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 15:12 Dan Carpenter [this message]
2022-03-10 15:20 ` [bug report] virtio_net: support rx/tx queue reset Xuan Zhuo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220310151221.GA2212@kili \
--to=dan.carpenter@oracle.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.