Message ID | 20180208171807.24267-1-stefanha@redhat.com |
---|---|
Headers | show |
Series | block: fix blk_aio_*() segfault when blk->root == NULL | expand |
On 02/08/2018 11:18 AM, Stefan Hajnoczi wrote: > Using bdrv_inc_in_flight(blk_bs(blk)) doesn't work since BlockBackend->root may > be NULL. > > This patch series solves the issue by adding an BlockBackend->in_flight counter > so requests can be tracked even when there is no BlockDriverState. > > This should fix the IDE and virtio-blk segfaults that have been encountered > when there is no BlockDriverState. > > The patch is based on work by Kevin Wolf. > > Kevin Wolf (1): > block: test blk_aio_flush() with blk->root == NULL > > Stefan Hajnoczi (2): > block: add BlockBackend->in_flight counter > Revert "IDE: Do not flush empty CDROM drives" Tested by applying the series out of order (2, 3, 1) - the new test fails after 2 (so even our workaround was not robust), fails after 3 (expected there, because we revert the workaround), then finally passes after 1 (the correct fix with no workaround needed). So for the series, you can add: Tested-by: Eric Blake <eblake@redhat.com>