[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: virtio_cleanup() missing in virtio-{blk, balloon, 9p}-p
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] Re: virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci |
Date: |
Mon, 11 Oct 2010 12:19:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7 |
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