Re: [PATCH v1] remoteproc: virtio: Load rvring->vq once in rproc_vq_interrupt()

From: Yuho Choi

Date: Fri Sep 25 2026 - 18:00:38 EST


On Fri, 25 Sept 2026 at 11:45, Mathieu Poirier
<mathieu.poirier@xxxxxxxxxx> wrote:

> We could lose the CPU right here and meanwhile, __rproc_virtio_del_vqs() deletes
> @vq. I don't see how READ_ONCE/WRITE_ONCE would change that.

You're right, the single load only closes the NULL window, not the
use-after-free.
I'll send a v2 that protects rvring->vq with SRCU, so that
__rproc_virtio_del_vqs()
waits for rproc_vq_interrupt() to finish before freeing the virtqueues.