qemu/hw/scsi
Maxim Levitsky 8cfe8013ba scsi/scsi_bus: fix races in REPORT LUNS
Currently scsi_target_emulate_report_luns iterates over the child device list
twice, and there is no guarantee that this list is the same in both iterations.

The reason for iterating twice is that the first iteration calculates
how much memory to allocate.  However if we use a dynamic array we can
avoid iterating twice, and therefore we avoid this race.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1866707

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-10-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-14-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-12 11:50:51 -04:00
..
emulation.c
esp-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
esp.c esp: Rename ESP_STATE to ESP 2020-09-09 13:20:22 -04:00
Kconfig
lsi53c895a.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
megasas.c hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl 2020-09-30 19:09:20 +02:00
meson.build
mfi.h
mpi.h
mptconfig.c
mptendian.c
mptsas.c mptsas: Move QOM macros to header 2020-08-27 14:04:55 -04:00
mptsas.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
scsi-bus.c scsi/scsi_bus: fix races in REPORT LUNS 2020-10-12 11:50:51 -04:00
scsi-disk.c Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
scsi-generic.c scsi-generic: Fix HM-zoned device scan 2020-09-30 19:09:20 +02:00
spapr_vscsi.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
srp.h
trace-events
trace.h
vhost-scsi-common.c vhost-scsi: support inflight io track 2020-09-30 19:09:20 +02:00
vhost-scsi.c monitor: Use getter/setter functions for cur_mon 2020-10-09 07:08:19 +02:00
vhost-user-scsi.c
viosrp.h
virtio-scsi-dataplane.c
virtio-scsi.c virtio-scsi: use scsi_device_get 2020-10-12 11:50:51 -04:00
vmw_pvscsi.c Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
vmw_pvscsi.h