From: "Michael S. Tsirkin" <mst@redhat.com>
To: forfortuna@naver.com
Cc: Harald Mommer <harald.mommer@oss.qualcomm.com>,
Matias Ezequiel Vara Larsen <mvaralar@redhat.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Mikhail Golubev-Ciuchea
<mikhail.golubev-ciuchea@oss.qualcomm.com>,
Francesco Valla <francesco@valla.it>,
virtualization@lists.linux.dev, linux-can@vger.kernel.org,
linux-kernel@vger.kernel.org, Jason Wang <jasowangio@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2 0/2] can: virtio: fix NAPI stall and virtqueue use before DRIVER_OK
Date: Thu, 3 Dec 2026 07:52:23 -0500 [thread overview]
Message-ID: <20261203075217-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20261120-virtio-can-ready-v2-0-0defda2af8cb@naver.com>
On Fri, Nov 20, 2026 at 03:56:02PM +0900, Seonghyeon Lim via B4 Relay wrote:
> This series fixes two issues in the virtio CAN driver.
>
> Patch 1 fixes an RX/TX stall when an interrupt arrives after the START
> command but before NAPI is enabled in virtio_can_open().
>
> Patch 2 calls virtio_device_ready() before the first virtqueue use in
> probe and restore. Without it, resume hangs if the interface was up.
>
> Patch 1 goes first: without patch 2, restore hangs waiting for the
> START reply before it reaches that window, so patch 2 alone would
> expose the stall.
>
> The interrupt handlers could also use virtqueue_napi_schedule() like
> virtio-net does. I left that for a follow-up cleanup.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Tested with QEMU 8.2 and vhost-device-can:
> - With the interface up, suspend/resume (pm_test=devices) hangs
> without patch 2 and completes with the series.
> - With a temporary delay before napi_enable() and continuous traffic,
> RX interrupts arrive while NAPI is disabled and napi_schedule_prep()
> fails. With patch 1, NAPI is scheduled right after napi_enable() and
> the RX poll runs without waiting for another interrupt.
> vhost-device-can keeps sending interrupts, which hides the stall
> without patch 1.
> - RX traffic and repeated down/up work. No lockdep warnings.
>
> ---
> Changes in v2:
> - Add patch 1 for the NAPI stall reported by sashiko-bot. With patch 2
> the restore path can reach it (Michael's question about callbacks
> after virtio_device_ready()).
> - Patch 2: describe the callbacks, add the hung task trace and
> Cc: stable.
> - Link to v1: https://patch.msgid.link/20261111-virtio-can-ready-v1-1-0b4dd020af0b@naver.com
>
> ---
> Seonghyeon Lim (2):
> can: virtio: fix RX/TX stall on interrupt before NAPI is enabled
> can: virtio: fix virtqueue use before DRIVER_OK
>
> drivers/net/can/virtio_can.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
> ---
> base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
> change-id: 20261111-virtio-can-ready-85cefff06a84
>
> Best regards,
> --
> Seonghyeon Lim <forfortuna@naver.com>
>
prev parent reply other threads:[~2026-12-03 12:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 6:56 [PATCH v2 0/2] can: virtio: fix NAPI stall and virtqueue use before DRIVER_OK Seonghyeon Lim
2026-11-20 6:56 ` Seonghyeon Lim via B4 Relay
2026-11-20 6:56 ` [PATCH v2 1/2] can: virtio: fix RX/TX stall on interrupt before NAPI is enabled Seonghyeon Lim
2026-11-20 6:56 ` Seonghyeon Lim via B4 Relay
2026-11-20 7:12 ` sashiko-bot
2026-11-20 6:56 ` [PATCH v2 2/2] can: virtio: fix virtqueue use before DRIVER_OK Seonghyeon Lim
2026-11-20 6:56 ` Seonghyeon Lim via B4 Relay
2026-11-20 7:03 ` sashiko-bot
2026-12-03 8:48 ` Michael S. Tsirkin
2026-12-03 11:19 ` Seonghyeon Lim
2026-12-03 11:35 ` Michael S. Tsirkin
2026-12-03 12:52 ` Michael S. Tsirkin [this message]
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=20261203075217-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=forfortuna@naver.com \
--cc=francesco@valla.it \
--cc=harald.mommer@oss.qualcomm.com \
--cc=jasowangio@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mikhail.golubev-ciuchea@oss.qualcomm.com \
--cc=mkl@pengutronix.de \
--cc=mvaralar@redhat.com \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
/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.