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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 700DBC432C0 for ; Tue, 26 Nov 2019 11:32:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 446C02075C for ; Tue, 26 Nov 2019 11:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574767944; bh=OSY9MPR4cc6yP50/3oT9Bs5kF7MQIdAwcMgjSP/P8nc=; h=To:Subject:Date:From:Cc:In-Reply-To:References:List-ID:From; b=BdmOyJXAzjRzmhDWML1U8w1+9PznUtglAF3GSzEQILyPCCJiBQeWC7xBWzdhE38KA lD1tqYqjVXgQjsXwY01Y6iwyO/coq1EAihiUUgq9qxRDcAMV/hLr+Ha3D022o7Lgw3 TikeWi25i4WJQqhf1BB+lkzdXb7iKgV6axKsBj7g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbfKZLcX (ORCPT ); Tue, 26 Nov 2019 06:32:23 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:37126 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfKZLcX (ORCPT ); Tue, 26 Nov 2019 06:32:23 -0500 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1iZZ4o-0007tn-89; Tue, 26 Nov 2019 12:32:14 +0100 To: Roy van Doormaal Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 26 Nov 2019 11:32:14 +0000 From: Marc Zyngier Cc: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Jason Cooper , Andrew Jeffery , , , , , In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: roy.van.doormaal@prodrive-technologies.com, brendanhiggins@google.com, benh@kernel.crashing.org, joel@jms.id.au, tglx@linutronix.de, jason@lakedaemon.net, andrew@aj.id.au, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-26 07:40, Roy van Doormaal wrote: > The aspeed irqchip driver overwrites the default irq domain name, > but doesn't free the existing domain name. > This patch frees the irq domain name before overwriting it. > > kmemleak trace: > > unreferenced object 0xb8004c40 (size 64): > comm "swapper", pid 0, jiffies 4294937303 (age 747.660s) > hex dump (first 32 bytes): > 3a 61 68 62 3a 61 70 62 3a 62 75 73 40 31 65 37 :ahb:apb:bus@1e7 > 38 61 30 30 30 3a 69 6e 74 65 72 72 75 70 74 2d 8a000:interrupt- > backtrace: > [<086b59b8>] kmemleak_alloc+0xa8/0xc0 > [] __kmalloc_track_caller+0x118/0x1a0 > [] kvasprintf+0x5c/0xc0 > [<49275eec>] kasprintf+0x30/0x50 > [<5713064b>] __irq_domain_add+0x184/0x25c > [<53c594d0>] aspeed_i2c_ic_of_init+0x9c/0x128 > [] of_irq_init+0x1ec/0x314 > [] irqchip_init+0x1c/0x24 > [<7ef974b3>] init_IRQ+0x30/0x90 > [<87a1438f>] start_kernel+0x28c/0x458 > [< (null)>] (null) > [] 0xffffffff > > Signed-off-by: Roy van Doormaal > > --- > Changes in v2: > - drop irq domain name assignment by the aspeed irqchip driver Which is good, except that the commit message doesn't quite reflect what this patch does anymore. I'll fix it when picking it for -rc1. Thanks, M. > --- > drivers/irqchip/irq-aspeed-i2c-ic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c > b/drivers/irqchip/irq-aspeed-i2c-ic.c > index 8d591c179f81..0bd46f63a3c3 100644 > --- a/drivers/irqchip/irq-aspeed-i2c-ic.c > +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c > @@ -92,8 +92,6 @@ static int __init aspeed_i2c_ic_of_init(struct > device_node *node, > goto err_iounmap; > } > > - i2c_ic->irq_domain->name = "aspeed-i2c-domain"; > - > irq_set_chained_handler_and_data(i2c_ic->parent_irq, > aspeed_i2c_ic_irq_handler, i2c_ic); -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak Date: Tue, 26 Nov 2019 11:32:14 +0000 Message-ID: References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> Sender: linux-kernel-owner@vger.kernel.org To: Roy van Doormaal Cc: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Jason Cooper , Andrew Jeffery , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org List-Id: linux-i2c@vger.kernel.org On 2019-11-26 07:40, Roy van Doormaal wrote: > The aspeed irqchip driver overwrites the default irq domain name, > but doesn't free the existing domain name. > This patch frees the irq domain name before overwriting it. > > kmemleak trace: > > unreferenced object 0xb8004c40 (size 64): > comm "swapper", pid 0, jiffies 4294937303 (age 747.660s) > hex dump (first 32 bytes): > 3a 61 68 62 3a 61 70 62 3a 62 75 73 40 31 65 37 :ahb:apb:bus@1e7 > 38 61 30 30 30 3a 69 6e 74 65 72 72 75 70 74 2d 8a000:interrupt- > backtrace: > [<086b59b8>] kmemleak_alloc+0xa8/0xc0 > [] __kmalloc_track_caller+0x118/0x1a0 > [] kvasprintf+0x5c/0xc0 > [<49275eec>] kasprintf+0x30/0x50 > [<5713064b>] __irq_domain_add+0x184/0x25c > [<53c594d0>] aspeed_i2c_ic_of_init+0x9c/0x128 > [] of_irq_init+0x1ec/0x314 > [] irqchip_init+0x1c/0x24 > [<7ef974b3>] init_IRQ+0x30/0x90 > [<87a1438f>] start_kernel+0x28c/0x458 > [< (null)>] (null) > [] 0xffffffff > > Signed-off-by: Roy van Doormaal > > --- > Changes in v2: > - drop irq domain name assignment by the aspeed irqchip driver Which is good, except that the commit message doesn't quite reflect what this patch does anymore. I'll fix it when picking it for -rc1. Thanks, M. > --- > drivers/irqchip/irq-aspeed-i2c-ic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c > b/drivers/irqchip/irq-aspeed-i2c-ic.c > index 8d591c179f81..0bd46f63a3c3 100644 > --- a/drivers/irqchip/irq-aspeed-i2c-ic.c > +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c > @@ -92,8 +92,6 @@ static int __init aspeed_i2c_ic_of_init(struct > device_node *node, > goto err_iounmap; > } > > - i2c_ic->irq_domain->name = "aspeed-i2c-domain"; > - > irq_set_chained_handler_and_data(i2c_ic->parent_irq, > aspeed_i2c_ic_irq_handler, i2c_ic); -- Jazz is not dead. It just smells funny... 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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 D07A8C432C3 for ; Tue, 26 Nov 2019 11:32:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F32C2075C for ; Tue, 26 Nov 2019 11:32:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UNz/KAqN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F32C2075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:From:Date: MIME-Version:Subject:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wTnOSe51MkdWrnrkLMr41hbUp0v3DzHFb9pAMAdvWUo=; b=UNz/KAqNWieW9BV0iFEVRVBYs bqnAMYNY/vS77rLr3njOl6xnI3JKqKb/ptnPJd72s2T/6y4TbbYFoR4vJiy43+W3DZ7FCbs3s9Xgl 3qpOt4K+rququ+HHTlY+P0IZd1i9RYhCjvO3HqF2gs+p7oB+rwFqHCBHNDcimFdbGOHGsOZuQT66E 0PcAu4BT1VDWuT4+K0QKiV8myyQkJBzB1AvbnjacIsRiIQk/VEcpAAUBImN80jZXuQzVIH9ddCEhG CeiJqPui7tMOCFZ4hOQZvibigS12bmRRiFoafi746eAiTJgTz45NLWjrRPgUpC+g/TsaiMz/qSI2v tJKWVml2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZZ55-000146-LC; Tue, 26 Nov 2019 11:32:31 +0000 Received: from inca-roads.misterjones.org ([213.251.177.50]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZZ52-0000Co-Gp for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2019 11:32:30 +0000 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1iZZ4o-0007tn-89; Tue, 26 Nov 2019 12:32:14 +0100 To: Roy van Doormaal Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Date: Tue, 26 Nov 2019 11:32:14 +0000 From: Marc Zyngier In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: roy.van.doormaal@prodrive-technologies.com, brendanhiggins@google.com, benh@kernel.crashing.org, joel@jms.id.au, tglx@linutronix.de, jason@lakedaemon.net, andrew@aj.id.au, linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191126_033228_723003_66BD32D2 X-CRM114-Status: GOOD ( 13.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Cooper , linux-aspeed@lists.ozlabs.org, Andrew Jeffery , Benjamin Herrenschmidt , openbmc@lists.ozlabs.org, Brendan Higgins , linux-kernel@vger.kernel.org, Joel Stanley , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2019-11-26 07:40, Roy van Doormaal wrote: > The aspeed irqchip driver overwrites the default irq domain name, > but doesn't free the existing domain name. > This patch frees the irq domain name before overwriting it. > > kmemleak trace: > > unreferenced object 0xb8004c40 (size 64): > comm "swapper", pid 0, jiffies 4294937303 (age 747.660s) > hex dump (first 32 bytes): > 3a 61 68 62 3a 61 70 62 3a 62 75 73 40 31 65 37 :ahb:apb:bus@1e7 > 38 61 30 30 30 3a 69 6e 74 65 72 72 75 70 74 2d 8a000:interrupt- > backtrace: > [<086b59b8>] kmemleak_alloc+0xa8/0xc0 > [] __kmalloc_track_caller+0x118/0x1a0 > [] kvasprintf+0x5c/0xc0 > [<49275eec>] kasprintf+0x30/0x50 > [<5713064b>] __irq_domain_add+0x184/0x25c > [<53c594d0>] aspeed_i2c_ic_of_init+0x9c/0x128 > [] of_irq_init+0x1ec/0x314 > [] irqchip_init+0x1c/0x24 > [<7ef974b3>] init_IRQ+0x30/0x90 > [<87a1438f>] start_kernel+0x28c/0x458 > [< (null)>] (null) > [] 0xffffffff > > Signed-off-by: Roy van Doormaal > > --- > Changes in v2: > - drop irq domain name assignment by the aspeed irqchip driver Which is good, except that the commit message doesn't quite reflect what this patch does anymore. I'll fix it when picking it for -rc1. Thanks, M. > --- > drivers/irqchip/irq-aspeed-i2c-ic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c > b/drivers/irqchip/irq-aspeed-i2c-ic.c > index 8d591c179f81..0bd46f63a3c3 100644 > --- a/drivers/irqchip/irq-aspeed-i2c-ic.c > +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c > @@ -92,8 +92,6 @@ static int __init aspeed_i2c_ic_of_init(struct > device_node *node, > goto err_iounmap; > } > > - i2c_ic->irq_domain->name = "aspeed-i2c-domain"; > - > irq_set_chained_handler_and_data(i2c_ic->parent_irq, > aspeed_i2c_ic_irq_handler, i2c_ic); -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel