Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3115674pxk; Mon, 7 Sep 2020 03:47:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYnRYalqkkDtQEKrO8F63FujtUBMe+U8OPCmQDrpkNVX/jy8oZCPrVwn30f6CjiD59/woh X-Received: by 2002:a50:cd5e:: with SMTP id d30mr20520959edj.190.1599475626486; Mon, 07 Sep 2020 03:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599475626; cv=none; d=google.com; s=arc-20160816; b=isl9HexklcCCeUIvE2LudfP5wUVQqQie/aweDMYjD5TXBOl8/HUBBX79y5xR7IM3Vz 66ZstkJkanmIFCIJq1rezHa5e4ftqihLFfpENFLHpgMCKmNyi0GfiVxca1NFUYS3ZZW2 PUU0FoPeEHPz/vaAENuO6Iw/UiVLX3Od9H0VS1RuhE73EiVAjy/TiEf0svyq87UJZRax Zqsqs+gtuw4mzMdoj5nayCINvGRMV61aYvk1KM/ou7cpbbWZxkAe9wy42H1KNhGb/nAz Uykt/vdSOUfScV3EDejQbMhSMp3xM1emZqTfVGj254A+IVHy0eS79gQUG8U1ha16XcgU IO7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zx04ZB+tiJvna86Iacu4Xsn12h+cpzXoXYObf/8TwEQ=; b=RQWyIoBp2wT93GaYMgsw+yjoBB/lfTumBV+exOuu6CB0P1K4GPubQAHfTlXhVqTnle jf7vRlFdxlYiEwc0tPmAcLFFqzg4aK6wsl7aHvhYqfG1IVkQSM+1tj+X1cje9xtLwlRo jn0rqHuR2mEL+8krItAHyVQl/XPlTwqkQ6rHkUxSvhyVoEE+enrKgzumKa9GzZ8mQBgP dhTHVYzj4uow9AwvlCgr7yu61tpWq9Lfo1FCchS/A+cDh7vBW15qh1TGZF+0UZMG9nTu OaNHadEoZ3Xs62tcxskQ2U1wHKB5zSLk+98Yg00OPZH8iL4pWbBynR5sCXgvHRsV+Vbw mIIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da18si4346682edb.466.2020.09.07.03.46.44; Mon, 07 Sep 2020 03:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728834AbgIGKp5 (ORCPT + 99 others); Mon, 7 Sep 2020 06:45:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:38788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728477AbgIGKpv (ORCPT ); Mon, 7 Sep 2020 06:45:51 -0400 Received: from gaia (unknown [46.69.195.48]) (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 0766520768; Mon, 7 Sep 2020 10:45:49 +0000 (UTC) Date: Mon, 7 Sep 2020 11:45:47 +0100 From: Catalin Marinas To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, bhelgaas@google.com, gcherian@marvell.com, guohanjun@huawei.com Subject: Re: [PATCH] arm64: PCI: fix memleak when calling pci_iomap/unmap() Message-ID: <20200907104546.GC26513@gaia> References: <20200905024811.74701-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200905024811.74701-1-yangyingliang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 10:48:11AM +0800, Yang Yingliang wrote: > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index 1006ed2d7c604..ddfa1c53def48 100644 > --- a/arch/arm64/kernel/pci.c > +++ b/arch/arm64/kernel/pci.c > @@ -217,4 +217,9 @@ void pcibios_remove_bus(struct pci_bus *bus) > acpi_pci_remove_bus(bus); > } > > +void pci_iounmap(struct pci_dev *dev, void __iomem *addr) > +{ > + iounmap(addr); > +} > +EXPORT_SYMBOL(pci_iounmap); So, what's wrong with the generic pci_iounmap() implementation? Shouldn't it call iounmap() already? -- Catalin