Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] PCI: Fix missing bridge dma_ranges resource list cleanup
@ 2019-10-08  1:23 Rob Herring
  2019-10-14 15:22 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2019-10-08  1:23 UTC (permalink / raw)
  To: linux-pci; +Cc: Srinath Mannam, Bjorn Helgaas

Commit e80a91ad302b ("PCI: Add dma_ranges window list") added a
dma_ranges resource list, but failed to correctly free the list when
devm_pci_alloc_host_bridge() is used.

Only the iproc host bridge driver is using the dma_ranges list.

Fixes: e80a91ad302b ("PCI: Add dma_ranges window list")
Cc: Srinath Mannam <srinath.mannam@broadcom.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/pci/probe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 3d5271a7a849..bdbc8490f962 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -572,6 +572,7 @@ static void devm_pci_release_host_bridge_dev(struct device *dev)
 		bridge->release_fn(bridge);
 
 	pci_free_resource_list(&bridge->windows);
+	pci_free_resource_list(&bridge->dma_ranges);
 }
 
 static void pci_release_host_bridge_dev(struct device *dev)
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: Fix missing bridge dma_ranges resource list cleanup
  2019-10-08  1:23 [PATCH] PCI: Fix missing bridge dma_ranges resource list cleanup Rob Herring
@ 2019-10-14 15:22 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2019-10-14 15:22 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-pci, Srinath Mannam

On Mon, Oct 07, 2019 at 08:23:25PM -0500, Rob Herring wrote:
> Commit e80a91ad302b ("PCI: Add dma_ranges window list") added a
> dma_ranges resource list, but failed to correctly free the list when
> devm_pci_alloc_host_bridge() is used.
> 
> Only the iproc host bridge driver is using the dma_ranges list.
> 
> Fixes: e80a91ad302b ("PCI: Add dma_ranges window list")
> Cc: Srinath Mannam <srinath.mannam@broadcom.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Rob Herring <robh@kernel.org>

Applied to pci/resource for v5.5, thanks!

> ---
>  drivers/pci/probe.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 3d5271a7a849..bdbc8490f962 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -572,6 +572,7 @@ static void devm_pci_release_host_bridge_dev(struct device *dev)
>  		bridge->release_fn(bridge);
>  
>  	pci_free_resource_list(&bridge->windows);
> +	pci_free_resource_list(&bridge->dma_ranges);
>  }
>  
>  static void pci_release_host_bridge_dev(struct device *dev)
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  1:23 [PATCH] PCI: Fix missing bridge dma_ranges resource list cleanup Rob Herring
2019-10-14 15:22 ` Bjorn Helgaas

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git