qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/3] hw/virtio: Acquire RCU read lock in virtqueue_packed_


From: Stefano Garzarella
Subject: Re: [PATCH v3 2/3] hw/virtio: Acquire RCU read lock in virtqueue_packed_drop_all()
Date: Tue, 5 Oct 2021 13:42:15 +0200

On Mon, Oct 04, 2021 at 11:27:12AM +0200, Philippe Mathieu-Daudé wrote:
On 10/4/21 11:23, Stefan Hajnoczi wrote:
On Mon, Sep 06, 2021 at 12:43:17PM +0200, Philippe Mathieu-Daudé wrote:
vring_get_region_caches() must be called with the RCU read lock
acquired. virtqueue_packed_drop_all() does not, and uses the
'caches' pointer. Fix that by using the RCU_READ_LOCK_GUARD()
macro.

Is this a bug that has been encountered, is it a latent bug, a code
cleanup, etc? The impact of this isn't clear but it sounds a little
scary so I wanted to check.

I'll defer to Stefano, but IIUC it is a latent bug discovered
during code audit.

Yep, I confirm this. We discovered it by discussing the documentation in a previous series.

Thanks,
Stefano




reply via email to

[Prev in Thread] Current Thread [Next in Thread]