[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v26 04/17] vfio: Add migration region initialization and fina
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v26 04/17] vfio: Add migration region initialization and finalize function |
Date: |
Mon, 28 Sep 2020 11:39:49 +0200 |
On Fri, 25 Sep 2020 14:20:06 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:
> On Wed, 23 Sep 2020 04:54:06 +0530
> Kirti Wankhede <kwankhede@nvidia.com> wrote:
> > +int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
> > +{
> > + struct vfio_region_info *info = NULL;
>
> Not sure this initialization is strictly necessary either, but it also
> seems to be a common convention for this function, so either way.
>
> Connie, does vfio_ccw_get_region() leak this? It appears to call
> vfio_get_dev_region_info() and vfio_get_region_info() several times with
> the same pointer without freeing it between uses.
Ugh, indeed, info is reallocated without freeing it inbetween. I'll
cook up a patch, thanks for spotting.
- [PATCH QEMU v25 00/17] Add migration support for VFIO devices, Kirti Wankhede, 2020/09/22
- [PATCH v26 01/17] vfio: Add function to unmap VFIO region, Kirti Wankhede, 2020/09/22
- [PATCH v26 02/17] vfio: Add vfio_get_object callback to VFIODeviceOps, Kirti Wankhede, 2020/09/22
- [PATCH v26 03/17] vfio: Add save and load functions for VFIO PCI devices, Kirti Wankhede, 2020/09/22
- [PATCH v26 04/17] vfio: Add migration region initialization and finalize function, Kirti Wankhede, 2020/09/22
- [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM, Kirti Wankhede, 2020/09/22
- [PATCH v26 06/17] vfio: Add migration state change notifier, Kirti Wankhede, 2020/09/22
- [PATCH v26 07/17] vfio: Register SaveVMHandlers for VFIO device, Kirti Wankhede, 2020/09/22