]> git.proxmox.com Git - mirror_qemu.git/commit - hw/virtio/vhost-user.c
vhost-user: unregister slave req handler at cleanup time
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 30 Jun 2017 16:04:22 +0000 (18:04 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Jul 2017 19:29:49 +0000 (22:29 +0300)
commitb9ec9bd468b2c5b218d16642e8f8ea4df60418bb
tree27020a2b06047394cd50696caacbee7ecff40d94
parent384b557da1a44ce260cd0328c06a250507348f73
vhost-user: unregister slave req handler at cleanup time

If the backend sends a request just before closing the socket,
the aio dispatcher might schedule its reading after the vhost
device has been cleaned, leading to a NULL pointer dereference
in slave_read();

vhost_user_cleanup() already closes the socket but it is not
enough, the handler has to be unregistered.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-user.c