net/virtio: fix queues pointer check
authorZhiyong Yang <zhiyong.yang@intel.com>
Wed, 21 Mar 2018 03:03:40 +0000 (11:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
commit7c7f2e6088aeb24d9ffbf41d1076512ca8da8a85
tree0d1ce733e960eb5813a162c99b5723c16512acd9
parent791b43e08842c95a7f4f879c32cc5225014f7ef5
net/virtio: fix queues pointer check

It is necessary to add pointer checking because in some case the
code will cause crash. For example, the code goes here before
memory allocation of rxvq is finished.

Fixes: 7365504f77e3 ("net/virtio: support guest announce")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_ethdev.c