Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1951091ybl; Tue, 3 Dec 2019 15:33:14 -0800 (PST) X-Google-Smtp-Source: APXvYqx8o71ppnLpxDVYo5FJcjDZkLLz4e1MkpegToTAaDuVD04R7M58MfJ6FAZmRokMJzMWUKvZ X-Received: by 2002:a05:6830:1d93:: with SMTP id y19mr393491oti.288.1575415993868; Tue, 03 Dec 2019 15:33:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575415993; cv=none; d=google.com; s=arc-20160816; b=QbBbK8uQe6aS069V9kDzskV25SyjQYC8NEajvKQ2s6zoFI9oZzubKWrL19Rz40mg5J D76qgtV0ZkVhEgF3vZS3EagevnPBwREA55sw2tc/JRSuQ0MIhugFKehkS0Z+cn4mAcQd 5iBp9XM1ENRwZAGjbzmY792eWBUg2q1xyNXoeexwsIOUlBq8DS1yz1rHmqpXHWS6snjr eFA9Eh84mNaQwy/aVcgK372FKEHPwLAEjZa/5H9oJO7tDwOnqF5gMQB5KsyLSk4j2Df2 FWe/ScXDYHUPo5xyrFK4gVii9vbR9WpJ1Xm3Mka18u3hAtvSSmiffpSTHHKSUBrOM7sa l0Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9aXu3KlzmsFJZ6e1TagDw+H66vR2neNxwDhx8plTDXE=; b=xNpqbxJpP3IH0vl0HM7jdw2A2AYViLVijQIKr4AQQNl75PSo5X216WCeFsrVHMEMt9 jhn+nhOCgwateTjTNY/sVAA7N8BYqXtlPwXPZfxbPrUvLag72eZuiVG7vrOPDxdEpZBZ nUSqwFP/JAYSkQchRj/mMkrCqAoHMpcBhJbQjiHGA3cetNMpgi7Oa510QZsHxP0l7vIn 3p9LAcC+txWayTPUMy9ftJbjMXxU9vekhfVWFOzWsLtlkCxU6A6PYJHKI1k55t/lMVUg DtWj6wfyW+DhfyQmrsYq+Dx84t0oyI3lSQ2Hv7Q7lvGegHcyLkoRG4z/Curf/Jthebj3 xRFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P2ym4D4f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si2406121oti.47.2019.12.03.15.32.59; Tue, 03 Dec 2019 15:33:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P2ym4D4f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727614AbfLCXTF (ORCPT + 99 others); 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-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.