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=-11.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 6B8ADC432C0 for ; Tue, 3 Dec 2019 23:19:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D10620684 for ; Tue, 3 Dec 2019 23:19:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="P2ym4D4f" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727645AbfLCXTF (ORCPT ); Tue, 3 Dec 2019 18:19:05 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39889 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbfLCXTF (ORCPT ); Tue, 3 Dec 2019 18:19:05 -0500 Received: by mail-pl1-f193.google.com with SMTP id o9so2304762plk.6 for ; Tue, 03 Dec 2019 15:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=P2ym4D4fL1+2jZqsid93tZ5apni+LjMsWc92QordN593FLqJA+W4QsDirE/huNl5P1 knTb5ViKDuyT37oe2VN6u4X65E0qoBXrLkTPFAuJUi/5puCIe1qhO5AoFzYvaAhJhDJ/ ZGHsuAM2+IsfbemFqexEjQZ4n4aB/Wh5ZwyttSwHl/fUGPvWV8l/4obp0kKZH4Bn7wN8 NCNmGeMIhEC8bdCNINKJ3DfitAYpZweN1bWtt3twrfio7lymvab4N1QAZRZDbCoA8ly6 E8ZrLQ9Zp/SCypjcbsQgMv1HiPrzTDj5AEqazdjiq8h5eXDuVNBII9xFODUIIb0IxZ2V PfHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=AV5kGwhXe5BxOYPlZLuDsbDrfv7KqMTT6UDseXrzkyrFm8fgzg1sZI6oUXPduspgwD howaTvUvQcOine6nAtdujVS2NjoZRo7TezBptxK9Rtw8PWA+HT3RXzkvzqexCyT4xcl0 357pZLq8IvZebJoc24qpXqIF9fqaQjCRJv1gv79b4fILRQET9HOaVuMkls0xpjwckRt/ Q7eJhjXzp5AyNCzLHq0SkbAQENfqlzu1MzhbFj5hc6TRVdX8BHQKS1YSOLp2W8xL93iZ nB0rvoAsfZttZB3fQ1hNfXQM7OfwbWLbs4d7sfPCwV1D+cNrrrj1sMSNMLeLxriuOgLL 3DmA== X-Gm-Message-State: APjAAAUq4FnYeBnQ2pGwUroBgsWCFAiMLpFFnoFaZdgmFau7sKqbxAv1 Qa6st9aQwGJm68Pb7CZ6Qw8X93eHe+fG33lOJwG1mA== X-Google-Smtp-Source: APXvYqwaPUhrCsgUEC6zT/MsYaJdSktVjMyOaLL/ZwQxaZzTYw2kYgyCxNVMDYa3yDWpwXTVusT3MTlJbF4W8DELTSA= X-Received: by 2002:a17:902:7c84:: with SMTP id y4mr417290pll.297.1575415143951; Tue, 03 Dec 2019 15:19:03 -0800 (PST) MIME-Version: 1.0 References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> From: Brendan Higgins Date: Tue, 3 Dec 2019 15:18:52 -0800 Message-ID: Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak To: Roy van Doormaal Cc: Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Jason Cooper , Marc Zyngier , Andrew Jeffery , linux-i2c@vger.kernel.org, OpenBMC Maillist , Linux Kernel Mailing List , Linux ARM , linux-aspeed Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 25, 2019 at 11:41 PM 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 Acked-by: Brendan Higgins Sorry for the delayed response. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2607:f8b0:4864:20::642; helo=mail-pl1-x642.google.com; envelope-from=brendanhiggins@google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="P2ym4D4f"; dkim-atps=neutral Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47SHxG5rMpzDq69 for ; Wed, 4 Dec 2019 10:19:07 +1100 (AEDT) Received: by mail-pl1-x642.google.com with SMTP id o8so2308942pls.5 for ; Tue, 03 Dec 2019 15:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=P2ym4D4fL1+2jZqsid93tZ5apni+LjMsWc92QordN593FLqJA+W4QsDirE/huNl5P1 knTb5ViKDuyT37oe2VN6u4X65E0qoBXrLkTPFAuJUi/5puCIe1qhO5AoFzYvaAhJhDJ/ ZGHsuAM2+IsfbemFqexEjQZ4n4aB/Wh5ZwyttSwHl/fUGPvWV8l/4obp0kKZH4Bn7wN8 NCNmGeMIhEC8bdCNINKJ3DfitAYpZweN1bWtt3twrfio7lymvab4N1QAZRZDbCoA8ly6 E8ZrLQ9Zp/SCypjcbsQgMv1HiPrzTDj5AEqazdjiq8h5eXDuVNBII9xFODUIIb0IxZ2V PfHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=ajEbxXMo02oVFJ4cwmYtkHlYYI3IBFE1huUTlLzWEAL3IfMtUZsAVjzIi1c1o1Hr4+ tGlSXudF9683Dsrn+ey9/J4m8ojkJ3nenBBMG+Bni7KbnZi1RQIDDvIgBCHFXo5gst/V qHaprqfnGa7XKTGpmgvR+wjp5/x0a5bnPEU6O5IcZ+UfMTsRYHAwaQUD3fwLKU4q7ZW2 PteS+pKFMZ8chVpxDryBw1lJ24Db2LUmQ2Wyc/4PFBaLgNu4pyGe4vBQTADoxAwzdLmW FX9/LEp/ZbEIHclrFS1LQeg5d8PDgusrSJIWK5jJattmjSF1Y0yriq00Czt0ly3K2Tn6 c+CA== X-Gm-Message-State: APjAAAW8zsawfurnINdQDvaTuLeZFi0Na7I0jvhj3lCWbiQxri3cSiMt mx7lpo17peJDgTo04Y6NrGfLtYueFXhtJtdGlf+IGA== X-Google-Smtp-Source: APXvYqwaPUhrCsgUEC6zT/MsYaJdSktVjMyOaLL/ZwQxaZzTYw2kYgyCxNVMDYa3yDWpwXTVusT3MTlJbF4W8DELTSA= X-Received: by 2002:a17:902:7c84:: with SMTP id y4mr417290pll.297.1575415143951; Tue, 03 Dec 2019 15:19:03 -0800 (PST) MIME-Version: 1.0 References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> From: Brendan Higgins Date: Tue, 3 Dec 2019 15:18:52 -0800 Message-ID: Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak To: Roy van Doormaal Cc: Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Jason Cooper , Marc Zyngier , Andrew Jeffery , linux-i2c@vger.kernel.org, OpenBMC Maillist , Linux Kernel Mailing List , Linux ARM , linux-aspeed Content-Type: text/plain; charset="UTF-8" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 23:19:15 -0000 On Mon, Nov 25, 2019 at 11:41 PM 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 Acked-by: Brendan Higgins Sorry for the delayed response. 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 ACA61C432C0 for ; Tue, 3 Dec 2019 23:19:11 +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 7C97520684 for ; Tue, 3 Dec 2019 23:19:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="svK3YwbG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="P2ym4D4f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C97520684 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T7od0a7RNDC000pnKWdUKR2Ex1bE1rYjzttlYQp4bBE=; b=svK3YwbGoKszc8 1vcR/54PguEVDLyNIGK4jd2Ula+80H2sS0bW2M1SJ1oIZ52XeP3WConklmm2Jl9ZhIhzLrhaFeFsL nXKp1vqzXx83vQmrcTdOUCu5d4rFbtkidG5PGtqVlhQT6nQEDN4e50xEw75jvXWM2zGV5vwYKXIzo uqXeoqOoJbmVILZI3hJrqPUAurZEXCMEW/qb0cg8+yG4E1mlGq3RQKW8pm+GLptNEmkKSkalEMKLw ahyMpULiLg1+j4C/e1ayLhM8wwJeOKHtfo/GoTjmEZHCYhVdV4T8WjKxSWXimIloE+DDNJPoLPiF8 oIwwzwTqNGV7WsKkV04A==; 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 1icHRm-0003pE-Nu; Tue, 03 Dec 2019 23:19:10 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icHRj-0003oK-Of for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2019 23:19:09 +0000 Received: by mail-pl1-x643.google.com with SMTP id w7so2292775plz.12 for ; Tue, 03 Dec 2019 15:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=P2ym4D4fL1+2jZqsid93tZ5apni+LjMsWc92QordN593FLqJA+W4QsDirE/huNl5P1 knTb5ViKDuyT37oe2VN6u4X65E0qoBXrLkTPFAuJUi/5puCIe1qhO5AoFzYvaAhJhDJ/ ZGHsuAM2+IsfbemFqexEjQZ4n4aB/Wh5ZwyttSwHl/fUGPvWV8l/4obp0kKZH4Bn7wN8 NCNmGeMIhEC8bdCNINKJ3DfitAYpZweN1bWtt3twrfio7lymvab4N1QAZRZDbCoA8ly6 E8ZrLQ9Zp/SCypjcbsQgMv1HiPrzTDj5AEqazdjiq8h5eXDuVNBII9xFODUIIb0IxZ2V PfHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=gVQ3uhGJPaluW3WV/m9oG10c0f237/XKp6eM5xKiWztz/OK1tWILGWw60EAzXPeHRE /phtdIGAApfweT4vp4Rh02/akj20PlDTB8qeXz1V8NLMjhTwDUrazyhDiR3hvPGHm45s iTzVRac6B/lYYxff+4esPO/IKHSAKzj5t0kHOOcwr/aerPktiEZnAsbqLhvyrMEGawRF sEuAgH2lctvki+QhZkfRmpbnOo9bwuTk7wJUIlLhaFx1pLQNZYne9IO0u/7BeUskUdS7 FyrJDwfozIzyOALyRICGxxeSUa+tIZ7UGD/zCqJamurWjomqQKaQCrEFRu73eJV8khOj JPDw== X-Gm-Message-State: APjAAAU/NfDRhO7BMDieqd1qxGO2FcTLxhaDRH7LQasR4wAWGXFVewWH dX7pCOOiHcFtlcqBT9RZSnxM4GD32g14axRfdxoiqFQ2ZjiuHA== X-Google-Smtp-Source: APXvYqwaPUhrCsgUEC6zT/MsYaJdSktVjMyOaLL/ZwQxaZzTYw2kYgyCxNVMDYa3yDWpwXTVusT3MTlJbF4W8DELTSA= X-Received: by 2002:a17:902:7c84:: with SMTP id y4mr417290pll.297.1575415143951; Tue, 03 Dec 2019 15:19:03 -0800 (PST) MIME-Version: 1.0 References: <20191125202937.23133-1-roy.van.doormaal@prodrive-technologies.com> <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> In-Reply-To: <20191126074025.5112-1-roy.van.doormaal@prodrive-technologies.com> From: Brendan Higgins Date: Tue, 3 Dec 2019 15:18:52 -0800 Message-ID: Subject: Re: [PATCH v2] irqchip/aspeed-i2c-ic: Fix irq domain name memory leak To: Roy van Doormaal X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191203_151907_825133_DEF26BE1 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. 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 , Andrew Jeffery , Benjamin Herrenschmidt , OpenBMC Maillist , Linux Kernel Mailing List , Joel Stanley , Marc Zyngier , Thomas Gleixner , Linux ARM , linux-i2c@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 25, 2019 at 11:41 PM 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 Acked-by: Brendan Higgins Sorry for the delayed response. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel