qemu-e2k/hw/block
Stefan Hajnoczi 1010cadf62 virtio-blk: fix race between .ioeventfd_stop() and vq handler
If the main loop thread invokes .ioeventfd_stop() just as the vq handler
function begins in the IOThread then the handler may lose the race for
the AioContext lock.  By the time the vq handler is able to acquire the
AioContext lock the ioeventfd has already been removed and the handler
isn't supposed to run anymore!

Use the new aio_wait_bh_oneshot() function to perform ioeventfd removal
from within the IOThread.  This way no races with the vq handler are
possible.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20180307144205.20619-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-08 17:38:51 +00:00
..
dataplane virtio-blk: fix race between .ioeventfd_stop() and vq handler 2018-03-08 17:38:51 +00:00
block.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
cdrom.c
ecc.c
fdc.c
hd-geometry.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
m25p80.c
Makefile.objs
nand.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
nvme.c pci: removed the is_express field since a uniform interface was inserted 2018-02-08 21:06:41 +02:00
nvme.h block: Move NVMe constants to a separate header 2018-02-08 09:22:03 +08:00
onenand.c Fixes after renaming __FUNCTION__ to __func__ 2018-01-22 09:46:57 +01:00
pflash_cfi01.c
pflash_cfi02.c
tc58128.c
trace-events trace: avoid SystemTap "char const" warnings 2018-02-19 13:09:44 +00:00
vhost-user-blk.c Clean up includes 2018-02-09 05:05:11 +01:00
virtio-blk.c
xen_blkif.h
xen_disk.c