lkml.org 
[lkml]   [2020]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 041/205] PCI: Fix missing bridge dma_ranges resource list cleanup
    Date
    From: Rob Herring <robh@kernel.org>

    [ Upstream commit 7608158df3ed87a5c938c4a0b91f5b11101a9be1 ]

    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")
    Link: https://lore.kernel.org/r/20191008012325.25700-1-robh@kernel.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Cc: Srinath Mannam <srinath.mannam@broadcom.com>
    Signed-off-by: Sasha Levin <sashal@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 64ebe3e5e611..d3033873395d 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
    \
     
     \ /
      Last update: 2020-01-16 17:47    [W:3.433 / U:0.436 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site