[PATCH v4 0/1] vhost-user: fix shared object lookup handler logic

Albert Esteve posted 1 patch 3 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251017072011.1874874-1-aesteve@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>
hw/virtio/vhost-user.c | 42 +++++++++++++++---------------------------
1 file changed, 15 insertions(+), 27 deletions(-)
[PATCH v4 0/1] vhost-user: fix shared object lookup handler logic
Posted by Albert Esteve 3 months, 3 weeks ago
v3->v4:
- Base the branch on [PATCH v10 0/7] vhost-user: Add SHMEM_MAP/UNMAP requests
- Add `reply_ack = false;` for SHMEM_MAP/UNMAP handlers.

v4 is based on:
[PATCH v10 0/7] vhost-user: Add SHMEM_MAP/UNMAP requests

Based-on: <20251016143827.1850397-1-aesteve@redhat.com>

Refactor backend_read() function and add a reply_ack variable
to have the option for handlers to force tweak whether they should
send a reply or not without depending on VHOST_USER_NEED_REPLY_MASK
flag.

This fixes an issue with
vhost_user_backend_handle_shared_object_lookup() logic, as the
error path was not closing the backend channel correctly. So,
we can remove the reply call from within the handler, make
sure it returns early on errors as other handlers do and
set the reply_ack variable on backend_read() to true to ensure
that it will send a response, thus keeping the original intent.

Albert Esteve (1):
  vhost-user: fix shared object lookup handler logic

 hw/virtio/vhost-user.c | 42 +++++++++++++++---------------------------
 1 file changed, 15 insertions(+), 27 deletions(-)

-- 
2.49.0