qemu-e2k/scripts
Kevin Wolf 6bc0bcc89f block: Fix deadlocks in bdrv_graph_wrunlock()
bdrv_graph_wrunlock() calls aio_poll(), which may run callbacks that
have a nested event loop. Nested event loops can depend on other
iothreads making progress, so in order to allow them to make progress it
must not hold the AioContext lock of another thread while calling
aio_poll().

This introduces a @bs parameter to bdrv_graph_wrunlock() whose
AioContext is temporarily dropped (which matches bdrv_graph_wrlock()),
and a bdrv_graph_wrunlock_ctx() that can be used if the BlockDriverState
doesn't necessarily exist any more when unlocking.

This also requires a change to bdrv_schedule_unref(), which was relying
on the incorrectly taken lock. It needs to take the lock itself now.
While this is a separate bug, it can't be fixed a separate patch because
otherwise the intermediate state would either deadlock or try to release
a lock that we don't even hold.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231115172012.112727-3-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[kwolf: Fixed up bdrv_schedule_unref()]
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-11-21 12:45:21 +01:00
..
ci
coccinelle
codeconverter
coverage
coverity-scan system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
kvm
modules
oss-fuzz system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
performance
qapi qapi: Fix QAPISchemaEntity.__repr__() 2023-11-13 10:36:51 +01:00
qemu-guest-agent
qemugdb
qmp
simplebench
tracetool tracetool: avoid invalid escape in Python string 2023-11-09 15:03:02 +08:00
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py scripts/analyse-locks-simpletrace.py: changed iteritems() to items() 2023-09-26 12:28:51 -04:00
analyze-inclusions
analyze-migration.py migration: Fix analyze-migration read operation signedness 2023-10-17 09:14:32 +02:00
archive-source.sh make-release: do not ship dtc sources 2023-09-29 09:33:10 +02:00
block-coroutine-wrapper.py block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
check_sparse.py
checkpatch.pl system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
clean-header-guards.pl
clean-includes
cleanup-trace-events.pl
cocci-macro-file.h
cpu-x86-uarch-abi.py scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd 2023-11-07 16:45:18 +00:00
decodetree.py
device-crash-test python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
disas-objdump.pl
dump-guest-memory.py
entitlement.sh
extract-vsssdk-headers
feature_to_c.py gdbstub: Add num_regs member to GDBFeature 2023-11-08 15:15:23 +00:00
fix-multiline-comments.sh
gensyscalls.sh
get_maintainer.pl scripts/get_maintainer.pl: don't print parentheses 2023-10-17 15:20:53 +02:00
git-submodule.sh
git.orderfile
hxtool
kernel-doc
make-config-poison.sh
make-release make-release: do not ship dtc sources 2023-09-29 09:33:10 +02:00
meson-buildoptions.py meson-buildoptions: document the data at the top 2023-10-18 10:01:02 +02:00
meson-buildoptions.sh build-sys: add a "pixman" feature 2023-11-07 14:04:24 +04:00
meson.build
minikconf.py
modinfo-collect.py
modinfo-generate.py
mtest2make.py
nsis.py
probe-gdb-support.py
python_qmp_updater.py scripts: add python_qmp_updater.py 2023-10-12 14:21:44 -04:00
qapi-gen.py
qemu-binfmt-conf.sh
qemu-gdb.py
qemu-stamp.py
qemu-trace-stap
qemu-version.sh
qom-cast-macro-clean-cocci-gen.py
refresh-pxe-roms.sh
render_block_graph.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
replay-dump.py
shaderinclude.py
signrom.py
simpletrace.py simpletrace: added simplified Analyzer2 class 2023-09-26 12:28:51 -04:00
symlink-install-tree.py
tracetool.py
u2f-setup-gen.py
undefsym.py
update-linux-headers.sh scripts/update-linux-headers: Add iommufd.h 2023-10-18 10:10:49 +02:00
update-mips-syscall-args.sh
update-syscalltbl.sh
userfaultfd-wrlat.py
vmstate-static-checker.py
xen-detect.c
xml-preprocess-test.py
xml-preprocess.py scripts/xml-preprocess: Make sure this script is invoked via the right Python 2023-10-12 00:37:39 +03:00