vhost: check virtqueue metadata pointer
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 19 Oct 2020 17:34:15 +0000 (19:34 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:26 +0000 (23:24 +0100)
commit60db6ddf623804d8225714e15ec69e8c14584bd0
treed0eaa3b985d5970999b88b952782d2eaef0cfe12
parentc59898131bbad375ccf27b75deab3f150e42de6c
vhost: check virtqueue metadata pointer

This patch checks whether the virtqueue metadata pointer
is valid before dereferencing it. It is not considered
a fix as earlier patch ensures there are no holes in the
array of virtqueue metadata pointers.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost_user.c