vhost: add sanity check on inflight last index
authorLi Feng <fengli@smartx.com>
Thu, 14 Oct 2021 12:40:08 +0000 (20:40 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 21 Oct 2021 12:24:21 +0000 (14:24 +0200)
commit5a4fbe79e6d124141bd0a820c897287b15c559c4
tree7bb7368b465e483482e26c97e5be0145c52e78ef
parent6474b59448700d6ed8c7a0b673ebd1dbb6063ca8
vhost: add sanity check on inflight last index

The index in rte_vhost_set_last_inflight_io_split is from
the frontend driver, check if it's in the virtqueue range.

Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring")
Cc: stable@dpdk.org
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/vhost/vhost.c