]> git.proxmox.com Git - mirror_qemu.git/commit
block: Take main AioContext lock when calling bdrv_open()
authorKevin Wolf <kwolf@redhat.com>
Thu, 25 May 2023 12:47:04 +0000 (14:47 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 30 May 2023 15:21:23 +0000 (17:21 +0200)
commitc6e0a6de62c5fa99ef06a9bb49c8072bcf93f431
treef5d9f4d7fa1c9df9acc4906f84a7676ffa122e3e
parentae400dbb8f439021bca5b8a7f60907bbd2cf5291
block: Take main AioContext lock when calling bdrv_open()

The function documentation already says that all callers must hold the
main AioContext lock, but not all of them do. This can cause assertion
failures when functions called by bdrv_open() try to drop the lock. Fix
a few more callers to take the lock before calling bdrv_open().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230525124713.401149-4-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/block-backend.c
block/qapi-sysemu.c
blockdev.c
qemu-nbd.c
tests/unit/test-block-iothread.c