From patchwork Thu Jan 16 23:17:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DE06C33CB6 for ; Thu, 16 Jan 2020 23:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6988E2072B for ; Thu, 16 Jan 2020 23:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579218237; bh=oXcqTYvmKHG2Oyu7/RIiGJnpCLc/p7lAUB5yf0Pq8iY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ox/Kj5pTsqqevAUB56kEaKV7rUM5hn/qjSRk8bHRi5SSr2o+mTy6IUmBr8P8zO15g t1rsHQGACrs+E1/bAq2eXFX3QM+5zpTd+uUERpqtzkpGO1kX2BLaxX7BqmkQZEgdH6 1cHAvsNHXcdExYPGj8LzVrMWMl+42Kl33J8tBPwo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733257AbgAPXYe (ORCPT ); Thu, 16 Jan 2020 18:24:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:53582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388172AbgAPXY3 (ORCPT ); Thu, 16 Jan 2020 18:24:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1299E2072B; Thu, 16 Jan 2020 23:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217069; bh=oXcqTYvmKHG2Oyu7/RIiGJnpCLc/p7lAUB5yf0Pq8iY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GnLln8KxGw8bsVYiJIxiLm+Nd1FHoMwm1juzz/yWc/GxZxtvUakX8aNzLIpj4u4lt 8tAuHRRu3msQoIXQRQrwunbm9+qUjxfFPEgzUPffZtQW0QWWEIGDejDmnro9k7E1h+ OCVUfN6Xl4miLsCgYEzaWWYdjJzZcreepsH6dtf8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Herring , Bjorn Helgaas , Srinath Mannam Subject: [PATCH 5.4 135/203] PCI: Fix missing bridge dma_ranges resource list cleanup Date: Fri, 17 Jan 2020 00:17:32 +0100 Message-Id: <20200116231756.875627199@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Herring commit 7608158df3ed87a5c938c4a0b91f5b11101a9be1 upstream. 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 Signed-off-by: Bjorn Helgaas Cc: Srinath Mannam Signed-off-by: Greg Kroah-Hartman --- drivers/pci/probe.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -572,6 +572,7 @@ static void devm_pci_release_host_bridge 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)