diff options
author | Mike Christie <[email protected]> | 2024-03-15 19:46:59 -0500 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2024-05-22 08:31:15 -0400 |
commit | b1b2ce58ed23c5d56e0ab299a5271ac01f95b75c (patch) | |
tree | 40a9175d8907d5cc071921e3d682ed8014c27240 /include/linux/fpga/fpga-mgr.h | |
parent | 7b1b5c7fff05bdf2dc21ee124907df1f8cc819ad (diff) |
vhost-scsi: Handle vhost_vq_work_queue failures for events
Currently, we can try to queue an event's work before the vhost_task is
created. When this happens we just drop it in vhost_scsi_do_plug before
even calling vhost_vq_work_queue. During a device shutdown we do the
same thing after vhost_scsi_clear_endpoint has cleared the backends.
In the next patches we will be able to kill the vhost_task before we
have cleared the endpoint. In that case, vhost_vq_work_queue can fail
and we will leak the event's memory. This has handle the failure by
just freeing the event. This is safe to do, because
vhost_vq_work_queue will only return failure for us when the vhost_task
is killed and so userspace will not be able to handle events if we
sent them.
Signed-off-by: Mike Christie <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions