linux_dsm_epyc7002/drivers/vhost
Jason Wang 816db76635 vhost: correctly check the return value of translate_desc() in log_used()
When fail, translate_desc() returns negative value, otherwise the
number of iovs. So we should fail when the return value is negative
instead of a blindly check against zero.

Detected by CoverityScan, CID# 1442593:  Control flow issues  (DEADCODE)

Fixes: cc5e710759 ("vhost: log dirty page correctly")
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-19 13:14:45 -08:00
..
Kconfig vhost: allow vhost-scsi driver to be built-in 2018-08-22 01:01:32 +03:00
Kconfig.vringh
Makefile
net.c vhost: fix OOB in get_rx_bufs() 2019-01-28 22:53:09 -08:00
scsi.c vhost: fix OOB in get_rx_bufs() 2019-01-28 22:53:09 -08:00
test.c
test.h
vhost.c vhost: correctly check the return value of translate_desc() in log_used() 2019-02-19 13:14:45 -08:00
vhost.h vhost: fix OOB in get_rx_bufs() 2019-01-28 22:53:09 -08:00
vringh.c
vsock.c vhost: fix OOB in get_rx_bufs() 2019-01-28 22:53:09 -08:00