OSDN Git Service

block: Fix AioContext locking in bdrv_open_inherit()
authorKevin Wolf <kwolf@redhat.com>
Mon, 5 Jun 2023 08:57:07 +0000 (10:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 28 Jun 2023 06:46:16 +0000 (08:46 +0200)
commitf665f01f729680077fc0ff2e5489618d9ecc380e
tree57046cb0f46abd6c50f8b9a6e19a074404d51f06
parent4b408668d0bd8fbac7b558bf9bc7acfce5aa0728
block: Fix AioContext locking in bdrv_open_inherit()

bdrv_open_inherit() calls several functions for which it needs to hold
the AioContext lock, but currently doesn't. This includes calls in
bdrv_append_temp_snapshot(), for which bdrv_open_inherit() is the only
caller. Fix the locking in these places.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230605085711.21261-8-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c