Re: [PATCH] PCI: Free released resource

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

 



On Wed, Sep 06, 2023 at 12:08:46PM +0100, Ross Lagerwall wrote:
> release_resource() doesn't actually free the resource or resource list
> entry so free the resource list entry to avoid a leak.
> 
> Fixes: e54223275ba1 ("PCI: Release resource invalidated by coalescing")
> Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> Reported-by: Kalle Valo <kvalo@xxxxxxxxxx>
> Closes: https://lore.kernel.org/r/878r9sga1t.fsf@xxxxxxxxxx/
> Tested-by: Kalle Valo <kvalo@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx      # v5.16+

Applied to for-linus for v6.6-rc1.

> ---
>  drivers/pci/probe.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index ab2a4a3a4c06..795534589b98 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -997,6 +997,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
>  		res = window->res;
>  		if (!res->flags && !res->start && !res->end) {
>  			release_resource(res);
> +			resource_list_destroy_entry(window);
>  			continue;
>  		}
>  
> -- 
> 2.41.0
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux