vhost: fix double read of descriptor flags
authorIlya Maximets <i.maximets@samsung.com>
Wed, 5 Dec 2018 15:09:26 +0000 (18:09 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Dec 2018 18:17:42 +0000 (18:17 +0000)
commit48cae0bfa60c451c5d9c0d5be932300aadc7e676
treec6b962046f96b6854fade4dde81efd0ebac013c6
parent81e5cdf19e583c742040d3be83b8cc79b451e243
vhost: fix double read of descriptor flags

Flags could be updated in a separate process leading to the
inconsistent check.

Additionally, read marked as 'volatile' to highlight the shared
nature of the variable and avoid such issues in the future.

Fixes: d3211c98c456 ("vhost: add helpers for packed virtqueues")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.h