diff options
| author | Kevin Wolf | 2017-11-29 11:25:10 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2017-11-29 14:22:03 +0100 |
| commit | 02d213009d571bcd7171e3ff9234722a11d30d1b (patch) | |
| tree | 9918d9451b520fe39245c7c7341059a503a2c39f /block/commit.c | |
| parent | blockjob: Remove the job from the list earlier in block_job_unref() (diff) | |
| download | qemu-02d213009d571bcd7171e3ff9234722a11d30d1b.tar.gz qemu-02d213009d571bcd7171e3ff9234722a11d30d1b.tar.xz qemu-02d213009d571bcd7171e3ff9234722a11d30d1b.zip | |
block: Expect graph changes in bdrv_parent_drained_begin/end
The .drained_begin/end callbacks can (directly or indirectly via
aio_poll()) cause block nodes to be removed or the current BdrvChild to
point to a different child node.
Use QLIST_FOREACH_SAFE() to make sure we don't access invalid
BlockDriverStates or accidentally continue iterating the parents of the
new child node instead of the node we actually came from.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/commit.c')
0 files changed, 0 insertions, 0 deletions
