vhost: fix lock on device readiness notification
authorJiayu Hu <jiayu.hu@intel.com>
Mon, 19 Jul 2021 15:00:45 +0000 (11:00 -0400)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 21 Jul 2021 05:56:13 +0000 (07:56 +0200)
commit7f31d4ea05ca80b58e3a3289c2a665071fb44a82
tree89d3156c636d9d59cc7e5eb8602e6dfbe6207400
parent92ed77dce68d45e7a343163cdc41ac9bdd099eec
vhost: fix lock on device readiness notification

The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/vhost/vhost_user.c