aboutsummaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-09-11 11:46:08 +0200
committerKevin Wolf <kwolf@redhat.com>2023-09-20 17:46:01 +0200
commit2f64e1fc57f1a275637ff6c34cb1a7207dc9e8c8 (patch)
treedb297283fbbfa75f3918304bb854365d1bdc9ace /linux-user/elfload.c
parentad29eb3ddc6ca0081a4d6fa8620ec2b8053e98b9 (diff)
downloadqemu-2f64e1fc57f1a275637ff6c34cb1a7207dc9e8c8.zip
qemu-2f64e1fc57f1a275637ff6c34cb1a7207dc9e8c8.tar.gz
qemu-2f64e1fc57f1a275637ff6c34cb1a7207dc9e8c8.tar.bz2
block: Mark bdrv_replace_child_tran() GRAPH_WRLOCK
Instead of taking the writer lock internally, require callers to already hold it when calling bdrv_replace_child_tran(). These callers will typically already hold the graph lock once the locking work is completed, which means that they can't call functions that take it internally. While a graph lock is held, polling is not allowed. Therefore draining the necessary nodes can no longer be done in bdrv_remove_child() and bdrv_replace_node_noperm(), but the callers must already make sure that they are drained. Note that the transaction callbacks still take the lock internally, so tran_finalize() must be called without the lock held. This is because bdrv_append() also calls bdrv_attach_child_noperm(), which currently requires to be called unlocked. Once it changes, the transaction callbacks can be changed, too. 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-10-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'linux-user/elfload.c')
0 files changed, 0 insertions, 0 deletions