Spdk/test/unit/lib/vhost/vhost_scsi.c
Dariusz Stojaczyk 024e0e9095 vhost: check against virtio descriptor table overflow
Also squashed function has_next_desc
into get_next_desc to simplify the
code.

We can't just mask indexes with
(desc_table_size - 1), since in
indirect descriptors case
desc_table_size might not be a
power of 2.

Change-Id: I8053b0e37c553548d76c7a9cfe6b4dbc11c28cfc
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/373744
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-09 14:09:00 -04:00
..
.gitignore ut/vhost: add UT coverage for vhost_scsi.c 2017-09-05 17:58:25 -04:00
Makefile ut/vhost: add UT coverage for vhost_scsi.c 2017-09-05 17:58:25 -04:00
vhost_scsi_ut.c vhost: check against virtio descriptor table overflow 2017-10-09 14:09:00 -04:00