From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9806BC05027 for ; Thu, 26 Jan 2023 08:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbjAZILH (ORCPT ); Thu, 26 Jan 2023 03:11:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbjAZILH (ORCPT ); Thu, 26 Jan 2023 03:11:07 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7115677AB; Thu, 26 Jan 2023 00:11:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 51246616D6; Thu, 26 Jan 2023 08:11:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B627AC433D2; Thu, 26 Jan 2023 08:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674720664; bh=7RFmWVvOCNPUgexHV5lN4KjzajuBanl+5PUPmWiJx24=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=b3PgGFG0hp15kD6X7eejX9t2P5bTRYkYl38joZjSPLLVq/RZYHA6GRlVjmT8ar2Xp 4gFWDqOT5jmuyCurXR03n3fb9jFXxn2NRB4rYaIJIANaE3N2DMzuukJYv43Q9/WJ6M 9yN6hjKvTKKrC8A76v4qsa07nO/RxQptebVEhKygllC7VbTV0IWcXesRDNtTv3wbY0 5+j0Jvy13PAHAf1+uSXo8xCEJe0+/oB9ZhziJs7rEEyCQilgDQ82vlx5dS8ak20iyG Nys9rZQIGY+3FTjcGoOZqMmxU302X+utyjowbNcYMN/4wnImZQPlqyTY698X3DwF/6 E1sekXv1J2IdA== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pKxLa-004kk0-8m; Thu, 26 Jan 2023 08:11:02 +0000 Date: Thu, 26 Jan 2023 08:10:08 +0000 Message-ID: <87a625emxr.wl-maz@kernel.org> From: Marc Zyngier To: Alex Williamson Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] genirq/msi: Fix fwnode leak In-Reply-To: <167468839713.2297784.1309086853550595503.stgit@omen> References: <167468839713.2297784.1309086853550595503.stgit@omen> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: alex.williamson@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, 25 Jan 2023 23:13:48 +0000, Alex Williamson wrote: > > kmemleak is reporting pairs of leaked buffers when PCI devices are > unbound from their drivers. One of these buffers contains the name of > the interrupt as generated for the msi_domain_template bundle in > msi_create_device_irq_domain(). This name is passed through > irq_domain_alloc_named_fwnode(), where an irqchip_rwid is allocated, > along with a separate allocation via kasprintf() for another copy of > the name. These are the two leaked buffers. > > Resolve this by adding the missing call to irq_domain_free_fwnode() in > msi_remove_device_irq_domain(). > > Fixes: 27a6dea3ebaa ("genirq/msi: Provide msi_create/free_device_irq_domain()") > Signed-off-by: Alex Williamson Thomas has already queued this: commit ac8f29aef2f1695956ff6773b33f975290437f29 (tip/irq/urgent) Author: Jason Gunthorpe Date: Tue Jan 17 15:16:17 2023 -0400 genirq/msi: Free the fwnode created by msi_create_device_irq_domain() which I assume will make it into Linus' tree shortly. Thanks, M. -- Without deviation from the norm, progress is not possible.