[PATCH 1/3] vhost: fix virtqueue array size for control queue

David Marchand david.marchand at redhat.com
Thu Jan 8 15:48:19 CET 2026


On Thu, 8 Jan 2026 at 14:50, Maxime Coquelin <maxime.coquelin at redhat.com> wrote:
>
> When max_queue_pairs is set to VHOST_MAX_QUEUE_PAIRS (128), VDUSE
> calculates total_queues as max_queue_pairs * 2 + 1 = 257 to account
> for the control queue. However, the virtqueue array was sized as
> VHOST_MAX_QUEUE_PAIRS * 2, causing an out-of-bounds array access.
>
> Fix by defining VHOST_MAX_VRING to explicitly account for the control
> queue (VHOST_MAX_QUEUE_PAIRS * 2 + 1) and using it for the virtqueue
> array size.
>
> Fixes: f0a37cc6a1e2 ("vhost: add multiqueue support to VDUSE")
> Cc: stable at dpdk.org
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Reviewed-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the stable mailing list