On Mon, Nov 21, 2022 at 12:12 PM David Marchand
<david.march...@redhat.com> wrote:
>
> The addition of the bus_info field did not account for the fact that the
> PCI bus can be scanned multiple times (like for device hotplug and other
> uses in SPDK).
> Indeed, during pci_scan_one() for devices that were already registered,
> the pci_common_set() overwrites the bus_info field, leaking the
> previously allocated memory.
>
> Since the bus_info content is fixed for a PCI device, we can simply skip
> allocation if dev->bus_info is already set.
>
> Fixes: 8f4de2dba9b9 ("bus/pci: fill bus specific information")
>
> Reported-by: Tomasz Zawadzki <tomasz.zawad...@intel.com>
> Signed-off-by: David Marchand <david.march...@redhat.com>

I did not hear feedback, nor objection.
The patch is simple, and it fixes a regression in the release.
So I'm taking this patch for rc4.

Applied, thanks.


-- 
David Marchand

Reply via email to