On Wed, Jul 15, 2020 at 06:01:55PM +0300, Maxim Levitsky wrote: > This fixes the race between device emulation code that tries to find > a child device to dispatch the request to (e.g a scsi disk), > and hotplug of a new device to that bus. > > Note that this doesn't convert all the readers of the list > but only these that might go over that list without BQL held. > > This is a very small first step to make this code thread safe. > > Suggested-by: Paolo Bonzini > Signed-off-by: Maxim Levitsky > --- > hw/core/bus.c | 28 ++++++++++++++++++---------- > hw/core/qdev.c | 37 +++++++++++++++++++++++-------------- > hw/scsi/scsi-bus.c | 17 ++++++++++++++--- > hw/scsi/virtio-scsi.c | 6 +++++- > include/hw/qdev-core.h | 9 +++++++++ > 5 files changed, 69 insertions(+), 28 deletions(-) Reviewed-by: Stefan Hajnoczi