Thread (1 message) flat view 1 message, 1 author, 2021-04-12

Re: Re: Re: [PATCH v6 03/10] vhost-vdpa: protect concurrent access to vhost device iotlb

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2021-04-12 09:02:51
Also in: kvm, linux-fsdevel, netdev

On Mon, Apr 12, 2021 at 10:29:17AM +0800, Yongji Xie wrote:
On Mon, Apr 12, 2021 at 4:49 AM Michael S. Tsirkin [off-list ref] wrote:
quoted
On Sun, Apr 11, 2021 at 01:36:18PM +0800, Yongji Xie wrote:
quoted
On Sat, Apr 10, 2021 at 12:16 AM Michael S. Tsirkin [off-list ref] wrote:
quoted
On Wed, Mar 31, 2021 at 04:05:12PM +0800, Xie Yongji wrote:
quoted
Use vhost_dev->mutex to protect vhost device iotlb from
concurrent access.

Fixes: 4c8cf318("vhost: introduce vDPA-based backend")
Cc: stable@vger.kernel.org
Signed-off-by: Xie Yongji <redacted>
Acked-by: Jason Wang <redacted>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
I could not figure out whether there's a bug there now.
If yes when is the concurrent access triggered?
When userspace sends the VHOST_IOTLB_MSG_V2 message concurrently?

vhost_vdpa_chr_write_iter -> vhost_chr_write_iter ->
vhost_vdpa_process_iotlb_msg()

Thanks,
Yongji
And then what happens currently?
Then we might access vhost_vdpa_map() concurrently and cause
corruption of the list and interval tree in struct vhost_iotlb.

Thanks,
Yongji
OK. Sounds like it's actually needed in this release if possible.  Pls
add this info in the commit log and post it as a separate patch. 

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help