From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdI1KXF (ORCPT ); Thu, 28 Sep 2017 06:23:05 -0400 Received: from terminus.zytor.com ([65.50.211.136]:33749 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751805AbdI1KXD (ORCPT ); Thu, 28 Sep 2017 06:23:03 -0400 Date: Thu, 28 Sep 2017 03:21:46 -0700 From: tip-bot for Jeffy Chen Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, jeffy.chen@rock-chips.com, hpa@zytor.com, tglx@linutronix.de Reply-To: tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, jeffy.chen@rock-chips.com, mingo@kernel.org In-Reply-To: <20170928043731.4764-1-jeffy.chen@rock-chips.com> References: <20170928043731.4764-1-jeffy.chen@rock-chips.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/urgent] irq/generic-chip: Don't replace domain's name Git-Commit-ID: 72364d320644c12948786962673772f271039a4a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 72364d320644c12948786962673772f271039a4a Gitweb: https://git.kernel.org/tip/72364d320644c12948786962673772f271039a4a Author: Jeffy Chen AuthorDate: Thu, 28 Sep 2017 12:37:31 +0800 Committer: Thomas Gleixner CommitDate: Thu, 28 Sep 2017 12:18:59 +0200 irq/generic-chip: Don't replace domain's name When generic irq chips are allocated for an irq domain the domain name is set to the irq chip name. That was done to have named domains before the recent changes which enforce domain naming were done. Since then the overwrite causes a memory leak when the domain name is dynamically allocated and even worse it would cause the domain free code to free the wrong name pointer, which might point to a constant. Remove the name assignment to prevent this. Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only") Signed-off-by: Jeffy Chen Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20170928043731.4764-1-jeffy.chen@rock-chips.com --- kernel/irq/generic-chip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c index f7086b7..5270a54 100644 --- a/kernel/irq/generic-chip.c +++ b/kernel/irq/generic-chip.c @@ -322,7 +322,6 @@ int __irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip, /* Calc pointer to the next generic chip */ tmp += sizeof(*gc) + num_ct * sizeof(struct irq_chip_type); } - d->name = name; return 0; } EXPORT_SYMBOL_GPL(__irq_alloc_domain_generic_chips);