[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize
From: |
Joao Martins |
Subject: |
Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize |
Date: |
Tue, 27 Jun 2023 11:21:36 +0100 |
>>> out_deregister:
>>> pci_device_set_intx_routing_notifier(&vdev->pdev, NULL);
>>> if (vdev->irqchip_change_notifier.notify) {
>>> kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier);
>>> }
>>> + vfio_disable_interrupts(vdev);
>>> + if (vdev->intx.mmap_timer) {
>>> + timer_free(vdev->intx.mmap_timer);
>>> + }
>>
>> But this one suggests another one as it looks a pre-existing issue?
> Yes, it's another resource leak I just found.
> Not sure if it's better to also merge above change to this patch which is
> targeting resource leak issues,
> or to PATCH2 which is targeting out_deregister path, or to create a new one.
> Any suggestion?
In general they are all bugs in the same deregistration path, but each resource
is not being teardown correctly. I tend to prefer 'logical change' per commit,
so there's would be a fix the irqchip_change notifier and another one for
mmap_timer teardown. Both with the Fixes tags that introduced each bug. Unless
everything was introduced by the same change in which case you would do
everything in one patch.
- [PATCH v3 2/3] vfio/pci: Fix a segfault in vfio_realize, (continued)
- [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Zhenzhong Duan, 2023/06/21
- Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Joao Martins, 2023/06/21
- RE: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Duan, Zhenzhong, 2023/06/25
- RE: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Duan, Zhenzhong, 2023/06/26
- Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Joao Martins, 2023/06/26
- RE: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Duan, Zhenzhong, 2023/06/26
- Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize,
Joao Martins <=
- RE: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize, Duan, Zhenzhong, 2023/06/27
[PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Zhenzhong Duan, 2023/06/21
- Re: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Avihai Horon, 2023/06/26
- Re: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Joao Martins, 2023/06/26
- RE: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Duan, Zhenzhong, 2023/06/26
- Re: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Joao Martins, 2023/06/27
- RE: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Duan, Zhenzhong, 2023/06/27
RE: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled", Duan, Zhenzhong, 2023/06/26