From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752478AbdFVQqY (ORCPT ); Thu, 22 Jun 2017 12:46:24 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45247 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbdFVQqW (ORCPT ); Thu, 22 Jun 2017 12:46:22 -0400 Date: Thu, 22 Jun 2017 09:41:45 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: hpa@zytor.com, hch@lst.de, peterz@infradead.org, mpe@ellerman.id.au, linux-kernel@vger.kernel.org, keith.busch@intel.com, axboe@kernel.dk, marc.zyngier@arm.com, tglx@linutronix.de, mingo@kernel.org Reply-To: mpe@ellerman.id.au, peterz@infradead.org, hch@lst.de, hpa@zytor.com, mingo@kernel.org, marc.zyngier@arm.com, tglx@linutronix.de, axboe@kernel.dk, linux-kernel@vger.kernel.org, keith.busch@intel.com In-Reply-To: <20170619235443.510684976@linutronix.de> References: <20170619235443.510684976@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq/msi: Prevent overwriting domain name Git-Commit-ID: 0165308a2f994939d2e1b36624f5a8f57746bc88 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 Archived-At: List-Archive: List-Post: Commit-ID: 0165308a2f994939d2e1b36624f5a8f57746bc88 Gitweb: http://git.kernel.org/tip/0165308a2f994939d2e1b36624f5a8f57746bc88 Author: Thomas Gleixner AuthorDate: Tue, 20 Jun 2017 01:37:04 +0200 Committer: Thomas Gleixner CommitDate: Thu, 22 Jun 2017 18:21:08 +0200 genirq/msi: Prevent overwriting domain name Prevent overwriting an already assigned domain name. Remove the extra check for chip->name, because if domain->name is NULL overwriting it with NULL is not a problem. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.510684976@linutronix.de --- kernel/irq/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index fe4d48e..9e3f185 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -274,7 +274,8 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0, fwnode, &msi_domain_ops, info); - if (domain && info->chip && info->chip->name) + + if (domain && !domain->name && info->chip) domain->name = info->chip->name; return domain;