vhost_scsi: Handle vhost_vq_work_queue failures for TMFs
authorMike Christie <michael.christie@oracle.com>
Sat, 16 Mar 2024 00:47:03 +0000 (19:47 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 22 May 2024 12:31:15 +0000 (08:31 -0400)
commit0352c961cb3542b1c03415259d7b85d99457acff
tree18902ac31dc92a99fdb2f330f4ebfb93a9cfc716
parentd9e59eec4aa7b0c46cec56f4f9cf595ea209da7e
vhost_scsi: Handle vhost_vq_work_queue failures for TMFs

vhost_vq_work_queue will never fail when queueing the TMF's response
handling because a guest can only send us TMFs when the device is fully
setup so there is always a worker at that time. In the next patches we
will modify the worker code so it handles SIGKILL by exiting before
outstanding commands/TMFs have sent their responses. In that case
vhost_vq_work_queue can fail when we try to send a response.

This has us just free the TMF's resources since at this time the guest
won't be able to get a response even if we could send it.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20240316004707.45557-6-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/scsi.c