]> git.ipfire.org Git - thirdparty/qemu.git/commit
libvhost-user: fix SLAVE_SEND_FD handling
authorJohannes Berg <johannes.berg@intel.com>
Tue, 3 Sep 2019 20:04:22 +0000 (23:04 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 28 Oct 2019 04:59:27 +0000 (23:59 -0500)
commit28a9a3558a427493049723fff390add7026653eb
tree0209358e6ee952cc0cb135d7e5eadfc3ce1f3498
parent9027d3fba605d8f6093342ebe4a1da450d374630
libvhost-user: fix SLAVE_SEND_FD handling

It doesn't look like this could possibly work properly since
VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD is defined to 10, but the
dev->protocol_features has a bitmap. I suppose the peer this
was tested with also supported VHOST_USER_PROTOCOL_F_LOG_SHMFD,
in which case the test would always be false, but nevertheless
the code seems wrong.

Use has_feature() to fix this.

Fixes: d84599f56c82 ("libvhost-user: support host notifier")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Message-Id: <20190903200422.11693-1-johannes@sipsolutions.net>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 8726b70b449896f1211f869ec4f608904f027207)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
contrib/libvhost-user/libvhost-user.c