Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Seonghyeon Lim" <forfortuna@naver.com>
To: "Michael S. Tsirkin" <mst@redhat.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 2/2] can: virtio: fix virtqueue use before DRIVER_OK
Date: Thu, 03 Dec 2026 20:19:27 +0900	[thread overview]
Message-ID: <b03b7612b0387b80fbf979683d8e62fe@cweb004.nm> (raw)
In-Reply-To: <20261203033538-mutt-send-email-mst@kernel.org>

On Thu, Dec 03, 2026 at 03:35:38AM -0500, Michael S. Tsirkin wrote:
> > +   virtio_device_ready(vdev);
> > +
> >     virtio_can_populate_rx_vq(vdev);
> >
> >     err = register_virtio_can_dev(dev);
>
> But this means device is now enabled on register failure.
> You have to reset it on failure then.

The failure path already does that: when register_virtio_can_dev()
fails, probe calls virtio_can_del_vq(), which starts with
virtio_reset_device() before deleting the virtqueues. The same goes for
restore when virtio_can_open() fails.

I can add a note about this to the commit message if you'd like.

Thanks,
Seonghyeon

  reply	other threads:[~2026-12-03 11:19 UTC|newest]

Thread overview: 6+ 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 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 via B4 Relay
2026-11-20  6:56 ` [PATCH v2 2/2] can: virtio: fix virtqueue use before DRIVER_OK Seonghyeon Lim via B4 Relay
2026-12-03  8:48   ` Michael S. Tsirkin
2026-12-03 11:19     ` Seonghyeon Lim [this message]
2026-12-03 11:35       ` Michael S. Tsirkin

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=b03b7612b0387b80fbf979683d8e62fe@cweb004.nm \
    --to=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=mst@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox