Wenwu Ma ad5050e42e examples/vhost: fix use after free on drain
When a vdev is removed in destroy_device function,
the corresponding vhost TX buffer will also be freed,
but the vhost TX buffer may still be used in the
drain_vhost function, which will cause an error of
heap-use-after-free. Therefore, before accessing
vhost TX buffer, we need to check whether the vdev
has been removed, if so, let's skip this vdev.

Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path")
Cc: stable@dpdk.org

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2021-10-21 14:24:21 +02:00
..
2021-10-18 19:20:20 +02:00
2021-10-18 19:20:20 +02:00
2021-10-18 19:20:21 +02:00
2021-05-05 22:20:24 +02:00
2021-10-18 19:20:20 +02:00
2021-10-18 19:20:20 +02:00
2021-05-05 22:20:24 +02:00