[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 4/6] Fix PCI address handling when controllers are deleted.



On Fri, Feb 26, 2010 at 02:09:17PM +0100, Wolfgang Mauerer wrote:
> When a controller is not present in the system anymore, the PCI address
> must be deleted from libvirt's hashtable because it can be re-used for
> other purposes.
> 
> Signed-off-by: Wolfgang Mauerer <wolfgang mauerer siemens com>
> Signed-off-by: Jan Kiszka <jan kiszka siemens com>
> ---
>  src/qemu/qemu_driver.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 5394ff5..8960ef8 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6280,6 +6280,11 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver,
>          VIR_FREE(vm->def->controllers);
>          vm->def->ncontrollers = 0;
>      }
> +
> +    if (qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) {
> +        VIR_WARN0("Unable to release PCI address on controller");
> +    }
> +
>      virDomainControllerDefFree(detach);
>  
>      ret = 0;


ACK, I have a feeling we leak the address in other hotunplug code too


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]