qemu/include/qemu
Kevin Wolf ae5a40e858 mirror: Don't call job_pause_point() under graph lock
Calling job_pause_point() while holding the graph reader lock
potentially results in a deadlock: bdrv_graph_wrlock() first drains
everything, including the mirror job, which pauses it. The job is only
unpaused at the end of the drain section, which is when the graph writer
lock has been successfully taken. However, if the job happens to be
paused at a pause point where it still holds the reader lock, the writer
lock can't be taken as long as the job is still paused.

Mark job_pause_point() as GRAPH_UNLOCKED and fix mirror accordingly.

Cc: qemu-stable@nongnu.org
Buglink: https://issues.redhat.com/browse/RHEL-28125
Fixes: 004915a96a ("block: Protect bs->backing with graph_lock")
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20240313153000.33121-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-03-18 12:03:04 +01:00
..
accel.h accel: Declare AccelClass::cpu_common_[un]realize() handlers 2023-10-03 08:00:25 -07:00
async-teardown.h
atomic128.h tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
atomic.h atomic.h: Reword confusing comment for qatomic_cmpxchg 2024-03-05 13:22:56 +00:00
base64.h
bcd.h
bitmap.h replace TABs with spaces 2023-03-20 12:43:50 +01:00
bitops.h migration/multifd: Support outgoing mapped-ram stream format 2024-03-01 15:42:04 +08:00
bswap.h bswap.h: Fix const_le64() macro 2024-01-26 12:19:35 +00:00
buffer.h
cacheflush.h
cacheinfo.h
chardev_open.h util/char_dev: Add open_cdev() 2023-12-19 19:03:38 +01:00
clang-tsa.h
co-shared-resource.h
compiler.h meson: do not use set10 2023-10-17 15:20:53 +02:00
config-file.h
coroutine_int.h
coroutine-core.h Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
coroutine-tls.h
coroutine.h Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
cpu-float.h
cpuid.h host/include/i386: Implement clmul.h 2023-09-15 13:57:00 +00:00
crc32c.h igb: Implement Rx SCTP CSO 2023-05-23 15:20:15 +08:00
crc-ccitt.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
ctype.h
cutils.h cutils: Adjust signature of parse_uint[_full] 2023-06-02 12:27:19 -05:00
datadir.h
dbus.h
defer-call.h util/defer-call: move defer_call() to util/ 2023-10-31 15:41:42 +01:00
drm.h
envlist.h remove unnecessary extern "C" blocks 2023-02-10 14:12:06 +01:00
error-report.h
event_notifier.h
fifo8.h util/fifo8: Introduce fifo8_peek_buf() 2024-01-10 06:58:50 +00:00
fifo32.h
filemonitor.h
futex.h
guest-random.h util/guest-random: Clean up global variable shadowing 2023-10-06 13:27:48 +02:00
hbitmap.h hbitmap: fix hbitmap_status() return value for first dirty bit case 2023-02-17 14:34:24 +01:00
help_option.h
help-texts.h docs: update copyright date to the year 2024 2024-03-11 17:21:21 +00:00
host-utils.h host-utils: Add muldiv64_round_up 2023-09-06 11:19:33 +02:00
hw-version.h
id.h
int128.h host/include/generic/host/atomic128: Fix compilation problem with Clang 17 2023-11-13 11:35:47 +01:00
interval-tree.h
iov.h util/iov: Remove qemu_iovec_init_extended() 2023-06-05 13:11:24 +02:00
iova-tree.h util: spelling fixes 2023-08-31 19:47:43 +02:00
jhash.h
job.h mirror: Don't call job_pause_point() under graph lock 2024-03-18 12:03:04 +01:00
keyval.h
lockable.h
log-for-trace.h
log.h util/log: Add vector registers to log 2023-06-13 17:42:01 +10:00
madvise.h
main-loop.h qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
memalign.h
memfd.h
mmap-alloc.h util/mmap-alloc: qemu_fd_getfs() 2023-04-24 11:29:00 +02:00
module.h
mprotect.h
notify.h migration: convert to NotifierWithReturn 2024-02-28 11:31:28 +08:00
nvdimm-utils.h
option_int.h
option.h
osdep.h chardev/parallel: Don't close stdin on inappropriate device 2024-02-14 07:44:38 +01:00
path.h
plugin-event.h include/qemu: Split out plugin-event.h 2023-03-22 15:06:57 +00:00
plugin-memory.h plugin: Simplify struct qemu_plugin_hwaddr 2023-09-16 14:57:15 +00:00
plugin.h plugins: add inline operation per vcpu 2024-03-06 12:35:29 +00:00
pmem.h
processor.h qemu/processor: Remove unused 'qemu/atomic.h' header 2023-08-31 19:47:43 +02:00
progress_meter.h
qdist.h
qemu-plugin.h plugins: remove non per_vcpu inline operation from API 2024-03-06 12:35:46 +00:00
qemu-print.h
qemu-progress.h
qht.h
qsp.h
qtree.h include: Clean up includes 2024-01-30 21:20:20 +03:00
queue.h
range.h range: Introduce range_inverse_array() 2023-11-03 09:20:31 +01:00
ratelimit.h
rcu_queue.h remove unnecessary extern "C" blocks 2023-02-10 14:12:06 +01:00
rcu.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
readline.h
reserved-region.h util/reserved-region: Add new ReservedRegion helpers 2023-11-03 09:20:31 +01:00
selfmap.h util/selfmap: Use dev_t and ino_t in MapInfo 2023-09-01 13:34:03 -07:00
seqlock.h
sockets.h osdep: implement qemu_socketpair() for win32 2023-03-13 15:39:31 +04:00
stats64.h stat64: Add stat64_set() operation 2023-04-27 16:39:43 +02:00
sys_membarrier.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
systemd.h
thread-context.h
thread-posix.h
thread-win32.h
thread.h system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
throttle-options.h
throttle.h throttle: use enum ThrottleDirection instead of bool is_write 2023-08-29 10:49:24 +02:00
timed-average.h
timer.h qemu/timer: Add host ticks function for RISC-V 2023-09-21 10:39:51 +02:00
transactions.h
tsan.h
typedefs.h migration: Remove SaveStateHandler and LoadStateHandler typedefs 2024-03-11 14:41:40 -04:00
unicode.h
units.h
uri.h util/uri: Remove the uri_string_escape() function 2024-01-24 09:54:05 +01:00
userfaultfd.h
uuid.h util/uuid: Define UUID_STR_LEN from UUID_NONE string 2023-11-03 09:20:31 +01:00
vfio-helpers.h
vhost-user-server.h export/vhost-user-blk: Fix consecutive drains 2023-11-28 14:56:32 +01:00
win_dump_defs.h
xattr.h
xxhash.h accel/tcg: include cs_base in our hash calculations 2023-06-01 11:05:05 -04:00
yank.h qapi: Fix dangling references to docs/devel/qapi-code-gen.txt 2024-01-26 07:04:53 +01:00