From 221caadcc5129d3ec5ad9ecfd7374de0f7050316 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 27 Oct 2023 17:53:10 +0200 Subject: block: Mark bdrv_probe_blocksizes() and callers GRAPH_RDLOCK This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_probe_blocksizes() need to hold a reader lock for the graph because it calls bdrv_filter_bs(), which accesses bs->file/backing. Signed-off-by: Kevin Wolf Message-ID: <20231027155333.420094-2-kwolf@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/raw-format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block/raw-format.c') diff --git a/block/raw-format.c b/block/raw-format.c index 8ff03adfa4..3fb77b0097 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -543,7 +543,8 @@ static int raw_probe(const uint8_t *buf, int buf_size, const char *filename) return 1; } -static int raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz) +static int GRAPH_RDLOCK +raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz) { BDRVRawState *s = bs->opaque; int ret; -- cgit v1.2.3