vhost: fix virtqueue initialization
vhost: fix virtqueue initialization

This patches fixes virtqueue initialization issue causing
segfault or file descriptor being closed unexpectedly.

The wrong index was passed to init_vring_queue() by
alloc_vring_queue() when a hole in the virtqueue array was
met.

Fixes: 8acd7c213353 ("vhost: fix virtqueues metadata allocation")
Cc: stable@dpdk.org

Reported-by: Yu Jiang <8aab3b2106d314d23f928279ec9cefc9b3e78641@intel.com>
Signed-off-by: Maxime Coquelin <9a2667dee3b90866bbc9c2696cff2b7d5616c95a@redhat.com>
Reviewed-by: David Marchand <f28529695cfa9e3e1eb84e7072aa626af4abb18e@redhat.com>
Tested-by: Yu Jiang <8aab3b2106d314d23f928279ec9cefc9b3e78641@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk