vhost: fix missing device pointer validity check
authorPatrick Fu <patrick.fu@intel.com>
Tue, 21 Jul 2020 03:23:04 +0000 (11:23 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 14:50:29 +0000 (16:50 +0200)
commit6a82bceb563f1be130f3af70cb8ffac261cb8033
tree4f6bfc05e874df021c174a48a9aaad72e9c44efb
parentd52a0478bb3494fa462228e214477b4758490a55
vhost: fix missing device pointer validity check

This patch adds the check of dev pointer in vhost async enqueue
completion poll. If a NULL dev pointer detected, the poll function
returns immediately.

Coverity issue: 360839
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