From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755512AbbFRMKY (ORCPT ); Thu, 18 Jun 2015 08:10:24 -0400 Received: from terminus.zytor.com ([198.137.202.10]:59770 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbbFRMKQ (ORCPT ); Thu, 18 Jun 2015 08:10:16 -0400 Date: Thu, 18 Jun 2015 05:08:54 -0700 From: tip-bot for Russell King Message-ID: Cc: linus.walleij@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, thierry.reding@gmail.com, jason@lakedaemon.net, lee.jones@linaro.org, rmk+kernel@arm.linux.org.uk, gnurou@gmail.com, hpa@zytor.com, mingo@kernel.org, ulli.kroll@googlemail.com Reply-To: thierry.reding@gmail.com, jason@lakedaemon.net, linux-kernel@vger.kernel.org, tglx@linutronix.de, linus.walleij@linaro.org, rmk+kernel@arm.linux.org.uk, lee.jones@linaro.org, ulli.kroll@googlemail.com, mingo@kernel.org, gnurou@gmail.com, hpa@zytor.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irq: spear-shirq: Fix race in installing chained IRQ handler Git-Commit-ID: 2aedd0fdc69467b1544773acf08333c6f0027e42 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: 2aedd0fdc69467b1544773acf08333c6f0027e42 Gitweb: http://git.kernel.org/tip/2aedd0fdc69467b1544773acf08333c6f0027e42 Author: Russell King AuthorDate: Tue, 16 Jun 2015 23:07:01 +0100 Committer: Thomas Gleixner CommitDate: Thu, 18 Jun 2015 14:03:09 +0200 irq: spear-shirq: Fix race in installing chained IRQ handler Fix a race where a pending interrupt could be received and the handler called before the handler's data has been setup, by converting to irq_set_chained_handler_and_data(). Signed-off-by: Russell King Cc: Alexandre Courbot Cc: Hans Ulli Kroll Cc: Jason Cooper Cc: Lee Jones Cc: Linus Walleij Cc: Thierry Reding Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/E1Z4z0X-0002T1-6U@rmk-PC.arm.linux.org.uk Signed-off-by: Thomas Gleixner --- drivers/irqchip/spear-shirq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c index 9c145a7..a451215 100644 --- a/drivers/irqchip/spear-shirq.c +++ b/drivers/irqchip/spear-shirq.c @@ -207,8 +207,7 @@ static void __init spear_shirq_register(struct spear_shirq *shirq, if (!shirq->irq_chip) return; - irq_set_chained_handler(parent_irq, shirq_handler); - irq_set_handler_data(parent_irq, shirq); + irq_set_chained_handler_and_data(parent_irq, shirq_handler, shirq); for (i = 0; i < shirq->nr_irqs; i++) { irq_set_chip_and_handler(shirq->virq_base + i,