From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755334AbbFRMJD (ORCPT ); Thu, 18 Jun 2015 08:09:03 -0400 Received: from terminus.zytor.com ([198.137.202.10]:59719 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754971AbbFRMIx (ORCPT ); Thu, 18 Jun 2015 08:08:53 -0400 Date: Thu, 18 Jun 2015 05:08:35 -0700 From: tip-bot for Russell King Message-ID: Cc: ulli.kroll@googlemail.com, linus.walleij@linaro.org, mingo@kernel.org, lee.jones@linaro.org, hpa@zytor.com, gnurou@gmail.com, jason@lakedaemon.net, rmk+kernel@arm.linux.org.uk, thierry.reding@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: jason@lakedaemon.net, thierry.reding@gmail.com, rmk+kernel@arm.linux.org.uk, gnurou@gmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, linus.walleij@linaro.org, mingo@kernel.org, lee.jones@linaro.org, ulli.kroll@googlemail.com, hpa@zytor.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] irq: irq-keystone: Fix race in installing chained IRQ handler Git-Commit-ID: 9414b6e2d55d0f7f07c3336d972818af366ae120 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: 9414b6e2d55d0f7f07c3336d972818af366ae120 Gitweb: http://git.kernel.org/tip/9414b6e2d55d0f7f07c3336d972818af366ae120 Author: Russell King AuthorDate: Tue, 16 Jun 2015 23:06:56 +0100 Committer: Thomas Gleixner CommitDate: Thu, 18 Jun 2015 14:03:08 +0200 irq: irq-keystone: 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/E1Z4z0S-0002Ss-1V@rmk-PC.arm.linux.org.uk Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-keystone.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c index 5dc6165..81e3cf5 100644 --- a/drivers/irqchip/irq-keystone.c +++ b/drivers/irqchip/irq-keystone.c @@ -184,8 +184,7 @@ static int keystone_irq_probe(struct platform_device *pdev) platform_set_drvdata(pdev, kirq); - irq_set_chained_handler(kirq->irq, keystone_irq_handler); - irq_set_handler_data(kirq->irq, kirq); + irq_set_chained_handler_and_data(kirq->irq, keystone_irq_handler, kirq); /* clear all source bits */ keystone_irq_writel(kirq, ~0x0);