vhost: fix possible dead loop in vector filling
authorTiwei Bie <tiwei.bie@intel.com>
Fri, 4 Jan 2019 04:06:41 +0000 (12:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000 (17:44 +0100)
commit450539b47ec89bcb49973a24b4c85c5f0bc8f37b
tree1f3f839e30806b62099659adffb9b3d49e9fb6dd
parent06fc8545fd6302f70de9ef5008a204e467d8cedb
vhost: fix possible dead loop in vector filling

Fix a possible dead loop which may happen, e.g. when driver
created a loop in the desc list and lens in descs are zero.

Fixes: fd68b4739d2c ("vhost: use buffer vectors in dequeue path")
Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c