Re: [Qemu-devel] [PATCH v2 10/17] block-backend: Fix potential double blk_delete()

2018-09-13 Thread Max Reitz
On 13.09.18 14:52, Kevin Wolf wrote: > blk_unref() first decreases the refcount of the BlockBackend and calls > blk_delete() if the refcount reaches zero. Requests can still be in > flight at this point, they are only drained during blk_delete(): > > At this point, arbitrary callbacks can run. If

Re: [Qemu-devel] [PATCH v2 10/17] block-backend: Fix potential double blk_delete()

2018-09-13 Thread Paolo Bonzini
On 13/09/2018 14:52, Kevin Wolf wrote: > blk_unref() first decreases the refcount of the BlockBackend and calls > blk_delete() if the refcount reaches zero. Requests can still be in > flight at this point, they are only drained during blk_delete(): > > At this point, arbitrary callbacks can run. I

[Qemu-devel] [PATCH v2 10/17] block-backend: Fix potential double blk_delete()

2018-09-13 Thread Kevin Wolf
blk_unref() first decreases the refcount of the BlockBackend and calls blk_delete() if the refcount reaches zero. Requests can still be in flight at this point, they are only drained during blk_delete(): At this point, arbitrary callbacks can run. If any callback takes a temporary BlockBackend ref