linux/drivers/vhost
Mike Christie 47a3565e8b vhost scsi: fix cmd completion race
We might not do the final se_cmd put from vhost_scsi_complete_cmd_work.
When the last put happens a little later then we could race where
vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends
more IO, and vhost_scsi_handle_vq runs but does not find any free cmds.

This patch has us delay completing the cmd until the last lio core ref
is dropped. We then know that once we signal to the guest that the cmd
is completed that if it queues a new command it will find a free cmd.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Maurizio Lombardi <mlombard@redhat.com>
Link: https://lore.kernel.org/r/1604986403-4931-4-git-send-email-michael.christie@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-11-15 17:30:55 -05:00
..
iotlb.c vhost: Fix documentation 2020-09-24 05:54:36 -04:00
Kconfig vhost_vdpa: implement IRQ offloading in vhost_vdpa 2020-08-05 11:08:42 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c virtio: fixes, features 2020-08-11 14:34:17 -07:00
scsi.c vhost scsi: fix cmd completion race 2020-11-15 17:30:55 -05:00
test.c tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c vdpa: handle irq bypass register failure case 2020-10-30 04:02:53 -04:00
vhost.c vhost: add helper to check if a vq has been setup 2020-11-15 17:30:54 -05:00
vhost.h vhost: add helper to check if a vq has been setup 2020-11-15 17:30:54 -05:00
vringh.c vringh: fix __vringh_iov() when riov and wiov are different 2020-10-21 10:38:45 -04:00
vsock.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00