Re: [Qemu-devel] [PATCH 02/55] block: Reset device model callbacks on detach

2011-07-25 Thread Christoph Hellwig
On Wed, Jul 20, 2011 at 06:23:36PM +0200, Markus Armbruster wrote: > BlockDriverState members change_cb and change_opaque are initially > null. The device model may set them, with bdrv_set_change_cb(). If > the device model gets detached (hot unplug), they're left dangling. > Only safe because de

[Qemu-devel] [PATCH 02/55] block: Reset device model callbacks on detach

2011-07-20 Thread Markus Armbruster
BlockDriverState members change_cb and change_opaque are initially null. The device model may set them, with bdrv_set_change_cb(). If the device model gets detached (hot unplug), they're left dangling. Only safe because device hot unplug automatically destroys the BlockDriverState. But that's a