Am 11.10.2010 12:00, schrieb Markus Armbruster:
> Pattern:
> 
> FOO's PCIDeviceInfo method exit is virtio_FOO_exit_pci(), which calls
> virtio_FOO_exit() and virtio_exit_pci().
> 
> virtio_{net,serial}_exit() call virtio_cleanup().
> 
> virtio_blk_exit() doesn't.  Why?
> 
> virtio-balloon-pci uses virtio_exit_pci() as exit method.  No
> virtio_cleanup()?
> 
> virtio-9p-pci doesn't have an exit method.  Doesn't feel right.
> 
> I suspect these three leak memory or worse on hot unplug.

Yes, virtio-blk seems to leak memory there.

We should probably also cancel all running requests before removing the
disk. I suspect not doing this could cause some segfaults when the AIO
callback wants to access a disk that doesn't exist any more.

Kevin

Reply via email to