Re: [PATCH 2/3] vhost: fix virtqueue access lock in datapath

2023-12-05 Thread Maxime Coquelin
On 10/23/23 11:55, David Marchand wrote: Now that a r/w lock is used, the access_ok field should only be updated under a write lock. Since the datapath code only takes a read lock on the virtqueue to check access_ok, this lock must be released and a write lock taken before calling vring_trans

Re: [PATCH 2/3] vhost: fix virtqueue access lock in datapath

2023-10-27 Thread Eelco Chaudron
On 27 Oct 2023, at 11:22, David Marchand wrote: > On Fri, Oct 27, 2023 at 11:05 AM Eelco Chaudron wrote: >>> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c >>> index 759a78e3e3..4116f79d4f 100644 >>> --- a/lib/vhost/virtio_net.c >>> +++ b/lib/vhost/virtio_net.c >>> @@ -1694,6 +16

Re: [PATCH 2/3] vhost: fix virtqueue access lock in datapath

2023-10-27 Thread David Marchand
On Fri, Oct 27, 2023 at 11:05 AM Eelco Chaudron wrote: > > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c > > index 759a78e3e3..4116f79d4f 100644 > > --- a/lib/vhost/virtio_net.c > > +++ b/lib/vhost/virtio_net.c > > @@ -1694,6 +1694,17 @@ virtio_dev_rx_packed(struct virtio_net *dev,

Re: [PATCH 2/3] vhost: fix virtqueue access lock in datapath

2023-10-27 Thread Eelco Chaudron
On 23 Oct 2023, at 11:55, David Marchand wrote: > Now that a r/w lock is used, the access_ok field should only be updated > under a write lock. > > Since the datapath code only takes a read lock on the virtqueue to check > access_ok, this lock must be released and a write lock taken before > ca

[PATCH 2/3] vhost: fix virtqueue access lock in datapath

2023-10-23 Thread David Marchand
Now that a r/w lock is used, the access_ok field should only be updated under a write lock. Since the datapath code only takes a read lock on the virtqueue to check access_ok, this lock must be released and a write lock taken before calling vring_translate(). Fixes: 03f77d66d966 ("vhost: change v