This is a note to let you know that I've just added the patch titled

    PM / Runtime: Don't enable interrupts while running in_interrupt

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-runtime-don-t-enable-interrupts-while-running-in_interrupt.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From c3810c88788d505d4ffd786addd111b745e42161 Mon Sep 17 00:00:00 2001
From: Alan Stern <[email protected]>
Date: Tue, 25 Jan 2011 20:50:07 +0100
Subject: PM / Runtime: Don't enable interrupts while running in_interrupt

From: Alan Stern <[email protected]>

commit c3810c88788d505d4ffd786addd111b745e42161 upstream.

This patch (as1445) fixes a bug in the runtime PM core left over from
the addition of the no_callbacks flag.  If this flag is set then it is
possible for rpm_suspend() to be called in_interrupt, so when
releasing spinlocks it's important not to re-enable interrupts.

To avoid an unnecessary save-and-restore of the interrupt flag, the
patch also inlines a pm_request_idle() call.

This fixes Bugzilla #27482.

(The offending code was added in 2.6.37, so it's not necessary to apply
this to any earlier stable kernels.)

Signed-off-by: Alan Stern <[email protected]>
Reported-by: tim blechmann <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/base/power/runtime.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -404,12 +404,15 @@ static int rpm_suspend(struct device *de
                goto out;
        }
 
+       /* Maybe the parent is now able to suspend. */
        if (parent && !parent->power.ignore_children) {
-               spin_unlock_irq(&dev->power.lock);
+               spin_unlock(&dev->power.lock);
 
-               pm_request_idle(parent);
+               spin_lock(&parent->power.lock);
+               rpm_idle(parent, RPM_ASYNC);
+               spin_unlock(&parent->power.lock);
 
-               spin_lock_irq(&dev->power.lock);
+               spin_lock(&dev->power.lock);
        }
 
  out:


Patches currently in stable-queue which might be from [email protected] 
are

queue-2.6.37/usb-prevent-buggy-hubs-from-crashing-the-usb-stack.patch
queue-2.6.37/perf-validate-cpu-early-in-perf_event_alloc.patch
queue-2.6.37/usb-ehci-fix-scheduling-while-atomic-during-suspend.patch
queue-2.6.37/usb-usb-storage-unusual_devs-entry-for-coby-mp3-player.patch
queue-2.6.37/usb-fix-race-between-root-hub-resume-and-wakeup-requests.patch
queue-2.6.37/pm-runtime-don-t-enable-interrupts-while-running-in_interrupt.patch
queue-2.6.37/usb-g_printer-fix-bug-in-unregistration.patch
queue-2.6.37/perf-find_get_context-fix-the-per-cpu-counter-check.patch
queue-2.6.37/usb-usb-storage-unusual_devs-entry-for-camsport-evo.patch
queue-2.6.37/usb-ehci-fix-dma-deallocation-bug.patch
queue-2.6.37/usb-g_printer-fix-bug-in-module-parameter-definitions.patch
queue-2.6.37/usb-serial-add-missing-.usb_driver-field-in-serial-drivers.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to