qemu-e2k/block
Kevin Wolf 1dbc7d3442 stream: Fix AioContext locking during bdrv_graph_wrlock()
In stream_prepare(), we need to temporarily drop the AioContext lock
that job_prepare_locked() took for us while calling the graph write lock
functions which can poll.

All block nodes related to this block job are in the same AioContext, so
we can pass any of them to bdrv_graph_wrlock()/ bdrv_graph_wrunlock().
Unfortunately, the one that we picked is base, which can be NULL - and
in this case the AioContext lock is not released and deadlocks can
occur.

Fix this by passing s->target_bs, which is never NULL.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231115172012.112727-4-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-11-21 12:45:21 +01:00
..
export
monitor
accounting.c
aio_task.c
amend.c
backup.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
blkdebug.c
blkio.c
blklogwrites.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
blkreplay.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
blkverify.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
block-backend.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
block-copy.c
block-gen.h
block-ram-registrar.c
bochs.c
cloop.c
commit.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
copy-before-write.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
copy-before-write.h
copy-on-read.c
copy-on-read.h
coroutines.h
create.c
crypto.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
crypto.h
curl.c
dirty-bitmap.c
dmg-bz2.c
dmg-lzfse.c
dmg.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
dmg.h
file-posix.c
file-win32.c
filter-compress.c
gluster.c
graph-lock.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
io_uring.c
io.c
iscsi-opts.c
iscsi.c
linux-aio.c
meson.build
mirror.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
nbd.c
nfs.c
null.c
nvme.c
parallels-ext.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
parallels.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
parallels.h block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
preallocate.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
progress_meter.c
qapi-sysemu.c
qapi.c
qcow2-bitmap.c
qcow2-cache.c
qcow2-cluster.c
qcow2-refcount.c
qcow2-snapshot.c
qcow2-threads.c
qcow2.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
qcow2.h
qcow.c
qed-check.c
qed-cluster.c
qed-l2-cache.c
qed-table.c
qed.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
qed.h block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
quorum.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
raw-format.c block: Protect bs->file with graph_lock 2023-11-08 17:56:18 +01:00
rbd.c
replication.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
reqlist.c
snapshot-access.c
snapshot.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
ssh.c
stream.c stream: Fix AioContext locking during bdrv_graph_wrlock() 2023-11-21 12:45:21 +01:00
throttle-groups.c
throttle.c
trace-events
trace.h
vdi.c
vhdx-endian.c
vhdx-log.c
vhdx.c
vhdx.h
vmdk.c block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
vpc.c
vvfat.c
win32-aio.c
write-threshold.c