diff options
author | Mike Christie <michael.christie@oracle.com> | 2024-03-15 19:46:59 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-05-22 08:31:15 -0400 |
commit | b1b2ce58ed23c5d56e0ab299a5271ac01f95b75c (patch) | |
tree | 40a9175d8907d5cc071921e3d682ed8014c27240 /tools/perf/scripts/python/exported-sql-viewer.py | |
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 <michael.christie@oracle.com>
Message-Id: <20240316004707.45557-2-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions