mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
block: Mark bdrv_parent_perms_conflict() and callers GRAPH_RDLOCK
The function reads the parents list, so it needs to hold the graph lock. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20230911094620.45040-14-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
afdaeb9ea0
commit
3804e3cf54
9 changed files with 66 additions and 26 deletions
|
@ -777,7 +777,7 @@ block_crypto_get_specific_info_luks(BlockDriverState *bs, Error **errp)
|
|||
return spec_info;
|
||||
}
|
||||
|
||||
static int
|
||||
static int GRAPH_RDLOCK
|
||||
block_crypto_amend_prepare(BlockDriverState *bs, Error **errp)
|
||||
{
|
||||
BlockCrypto *crypto = bs->opaque;
|
||||
|
@ -793,7 +793,7 @@ block_crypto_amend_prepare(BlockDriverState *bs, Error **errp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
static void GRAPH_RDLOCK
|
||||
block_crypto_amend_cleanup(BlockDriverState *bs)
|
||||
{
|
||||
BlockCrypto *crypto = bs->opaque;
|
||||
|
@ -841,6 +841,8 @@ block_crypto_amend_options_luks(BlockDriverState *bs,
|
|||
QCryptoBlockAmendOptions *amend_options = NULL;
|
||||
int ret = -EINVAL;
|
||||
|
||||
assume_graph_lock(); /* FIXME */
|
||||
|
||||
assert(crypto);
|
||||
assert(crypto->block);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue