summary refs log tree commit diff stats
path: root/scripts/qapi/visit.py
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2018-02-16 16:50:13 +0000
committerKevin Wolf <kwolf@redhat.com>2018-03-02 18:39:07 +0100
commit33f2a7577787910bda161f428c904ac6a14b2454 (patch)
treedb049b4cacc288b6f3c5b7314baac4ea0ab25ffe /scripts/qapi/visit.py
parent7719f3c968c59e1bcda7e177679dc765b59e578f (diff)
downloadfocaccia-qemu-33f2a7577787910bda161f428c904ac6a14b2454.tar.gz
focaccia-qemu-33f2a7577787910bda161f428c904ac6a14b2454.zip
block: add BlockBackend->in_flight counter
BlockBackend currently relies on BlockDriverState->in_flight to track
requests for blk_drain().  There is a corner case where
BlockDriverState->in_flight cannot be used though: blk->root can be NULL
when there is no medium.  This results in a segfault when the NULL
pointer is dereferenced.

Introduce a BlockBackend->in_flight counter for aio requests so it works
even when blk->root == NULL.

Based on a patch by Kevin Wolf <kwolf@redhat.com>.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi/visit.py')
0 files changed, 0 insertions, 0 deletions