Re: [PATCH] can: virtio: fix virtqueue use before DRIVER_OK

From: 임성현

Date: Tue Nov 10 2026 - 19:16:04 EST


On Tue, Nov 10, 2026 at 12:26:..., Michael S. Tsirkin wrote:
> however, device ready means you can get callbacks: config
> and vq.
>
> did you audit the driver to make sure this is safe while
> probe did not yet populate and register the device?

Thanks for the review.

Config callbacks are fine: config_core_enabled stays false until
probe/restore returns, so a config change is deferred until then.

For vq callbacks, there is a real problem, also reported by
sashiko-bot: an RX/TX interrupt that arrives before
virtio_can_napi_enable() in virtio_can_open() calls
virtqueue_disable_cb() while NAPI is still disabled, so the queue
stalls. This already exists in the open path, but with this patch
restore can now reach it.

I will fix that first in a separate patch and send v2 as a
two-patch series.

Thanks,
Seonghyeon