On 4/2/25 8:53 AM, David Marchand wrote:
The idx field of a virtqueue available ring is increased by the driver
regardless of the ring size. It is for the device to mask this index
modulo the ring size (2.7.6 of the virtio 1.3 specification).
The same applies to the used ring.

Failing to mask triggers:
- crashes when popping message received on the cvq,
- system lockups (in the case of VDUSE) when the virtio-net driver waits
   infinitely,

Fixes: 474f4d7840ad ("vhost: add control virtqueue")
Cc: sta...@dpdk.org

Signed-off-by: David Marchand <david.march...@redhat.com>
---
  lib/vhost/virtio_net_ctrl.c | 10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)



Thanks for the fix!

Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>
Tested-by: Maxime Coquelin <maxime.coque...@redhat.com>

Maxime

Reply via email to