Message ID | 20250108124649.333668-1-f.ebner@proxmox.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | block-backend: protect setting block root to NULL with block graph write lock | expand |
diff --git a/block/block-backend.c b/block/block-backend.c index c93a7525ad..9678615318 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -887,9 +887,9 @@ void blk_remove_bs(BlockBackend *blk) */ blk_drain(blk); root = blk->root; - blk->root = NULL; bdrv_graph_wrlock(); + blk->root = NULL; bdrv_root_unref_child(root); bdrv_graph_wrunlock(); }