[libvirt] [PATCHv2] qemu_hotplug: Don't free the PCI device structure after hot-unplug

Eric Blake eblake at redhat.com
Tue May 22 12:42:19 UTC 2012


On 05/22/2012 03:00 AM, Peter Krempa wrote:
> The pciDevice structure corresponding to the device being hot-unplugged
> was freed after it was "stolen" from activeList. The pointer was still
> used for eg-inactive list. This patch removes the free of the structure
> and frees it only if reset fails on the device.
> ---
> I've added a check for activePci to be non-null. This should not happen
> now that the activePciHostdevs list does not get corrupted, but if the lookup for
> some strange reason fails, don't enter pciResetDevice with NULL activePci that would
> cause a segfault.
> ---
> 
>  src/qemu/qemu_hotplug.c |   11 +++++++----
>  1 files changed, 7 insertions(+), 4 deletions(-)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120522/6e93f51a/attachment-0001.sig>


More information about the libvir-list mailing list