vhost: fix missing virtqueue status check in async path
authorPatrick Fu <patrick.fu@intel.com>
Tue, 21 Jul 2020 03:35:57 +0000 (11:35 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 14:50:29 +0000 (16:50 +0200)
commit5c7ddd6b14eddeb540cc28d0fc8b5d411f9d7661
treed50190bc9111c2f99dc019e5c72b461bda3880c5
parent6a82bceb563f1be130f3af70cb8ffac261cb8033
vhost: fix missing virtqueue status check in async path

Vring should not be touched if vq is disabled. This patch adds the vq
status check in async enqueue polling to avoid accessing to a disabled
queue.

Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c