[3.11.y.z extended stable] Patch "mfd: rtsx_pcr: Disable interrupts before cancelling delayed works" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Jan 13 14:44:18 UTC 2014


This is a note to let you know that I have just added a patch titled

    mfd: rtsx_pcr: Disable interrupts before cancelling delayed works

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From ca1fee8721e26ec9f9f7a7b6d6c0fa8e75806bfd Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx at linutronix.de>
Date: Mon, 2 Dec 2013 12:20:36 +0100
Subject: mfd: rtsx_pcr: Disable interrupts before cancelling delayed works

commit 73beb63d290f961c299526852884846b0d868840 upstream.

This fixes a kernel panic when resuming from suspend to RAM.
Without this fix an interrupt hits after the delayed work is canceled
and thus requeues it. So we end up freeing an armed timer.

Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Signed-off-by: Samuel Ortiz <sameo at linux.intel.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/mfd/rtsx_pcr.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index dd186c4..ccf79a1 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1200,8 +1200,14 @@ static void rtsx_pci_remove(struct pci_dev *pcidev)

 	pcr->remove_pci = true;

-	cancel_delayed_work(&pcr->carddet_work);
-	cancel_delayed_work(&pcr->idle_work);
+	/* Disable interrupts at the pcr level */
+	spin_lock_irq(&pcr->lock);
+	rtsx_pci_writel(pcr, RTSX_BIER, 0);
+	pcr->bier = 0;
+	spin_unlock_irq(&pcr->lock);
+
+	cancel_delayed_work_sync(&pcr->carddet_work);
+	cancel_delayed_work_sync(&pcr->idle_work);

 	mfd_remove_devices(&pcidev->dev);

--
1.8.3.2





More information about the kernel-team mailing list