aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-06-21 20:46:05 +0200
committerKevin Wolf <kwolf@redhat.com>2016-07-13 13:28:00 +0200
commit8daea510951dd309a44cea8de415c685c43851cf (patch)
treeea98591f6d38d987d463f1a481f896d79b28a331 /hw/block
parent0b8b8753e4d94901627b3e86431230f2319215c4 (diff)
block/qdev: Allow node name for drive properties
If a node name instead of a BlockBackend name is specified as the driver for a guest device, an anonymous BlockBackend is created now. The order of operations in release_drive() must be reversed in order to avoid a use-after-free bug because now blk_detach_dev() frees the last reference if an anonymous BlockBackend is used. usb-storage uses a hack where it forwards its BlockBackend as a property to another device that it internally creates. This hack must be updated so that it doesn't drop its original BB before it can be passed to the other device. This used to work because we always had the monitor reference around, but with node-names the device reference is the only one now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw/block')
0 files changed, 0 insertions, 0 deletions