qemu-e2k/hw/scsi
Stefan Hajnoczi 535a3d9a32 virtio-scsi: avoid dangling host notifier in ->ioeventfd_stop()
virtio_scsi_dataplane_stop() calls blk_drain_all(), which invokes
->drained_begin()/->drained_end() after we've already detached the host
notifier. virtio_scsi_drained_end() currently attaches the host notifier
again and leaves it dangling after dataplane has stopped.

This results in the following assertion failure because
virtio_scsi_defer_to_dataplane() is called from the IOThread instead of
the main loop thread:

  qemu-system-x86_64: ../softmmu/memory.c:1111: memory_region_transaction_commit: Assertion `qemu_mutex_iothread_locked()' failed.

Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1680
Reported-by: Jean-Louis Dupond <jean-louis@dupond.be>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230611193924.2444914-1-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-06-26 09:50:00 -04:00
..
emulation.c
esp-pci.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
esp.c Fix several typos in documentation (found by codespell) 2022-11-11 09:39:25 +01:00
Kconfig hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig 2023-06-23 02:54:44 -04:00
lsi53c895a.c hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330) 2023-05-26 09:37:04 +02:00
megasas.c hw/scsi/megasas: Silent GCC duplicated-cond warning 2023-06-13 11:28:58 +02:00
meson.build hw/virtio: Build various target-agnostic objects just once 2023-06-23 02:54:44 -04:00
mfi.h Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
mpi.h
mptconfig.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
mptendian.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
mptsas.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
mptsas.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
scsi-bus.c virtio-scsi: implement BlockDevOps->drained_begin() 2023-05-30 17:32:02 +02:00
scsi-disk.c virtio-scsi: implement BlockDevOps->drained_begin() 2023-05-30 17:32:02 +02:00
scsi-generic.c scsi-generic: fix buffer overflow on block limits inquiry 2023-05-18 08:53:51 +02:00
spapr_vscsi.c scsi: Use device_cold_reset() and bus_cold_reset() 2022-10-18 13:58:04 +02:00
srp.h
trace-events virtio-scsi: implement BlockDevOps->drained_begin() 2023-05-30 17:32:02 +02:00
trace.h
vhost-scsi-common.c vhost-scsi: fix memleak of vsc->inflight 2023-01-08 01:54:23 -05:00
vhost-scsi.c hw/virtio: Remove unnecessary 'virtio-access.h' header 2023-06-23 02:54:44 -04:00
vhost-user-scsi.c hw/virtio: Remove unnecessary 'virtio-access.h' header 2023-06-23 02:54:44 -04:00
viosrp.h Updated the FSF address to <https://www.gnu.org/licenses/> 2023-02-27 09:15:39 +01:00
virtio-scsi-dataplane.c hw/virtio: Remove unnecessary 'virtio-access.h' header 2023-06-23 02:54:44 -04:00
virtio-scsi.c virtio-scsi: avoid dangling host notifier in ->ioeventfd_stop() 2023-06-26 09:50:00 -04:00
vmw_pvscsi.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
vmw_pvscsi.h