Re: [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic: rmmod/0x00000001/4568

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, May 25, 2007 - 3:00 pm

On Fri, 25 May 2007 14:40:05 -0700 Greg KH <gregkh@suse.de> wrote:


pretty obvious.  cpufreq_unregister_notifier() sleeps, and that patch
causes it to be called under spinlock.

Something like this...

--- a/drivers/usb/host/ehci-hcd.c~fix-gregkh-usb-usb-ehci-cpufreq-fix
+++ a/drivers/usb/host/ehci-hcd.c
@@ -452,14 +452,14 @@ static void ehci_stop (struct usb_hcd *h
 	if (HC_IS_RUNNING (hcd->state))
 		ehci_quiesce (ehci);
 
-#ifdef CONFIG_CPU_FREQ
-	cpufreq_unregister_notifier(&ehci->cpufreq_transition,
-				    CPUFREQ_TRANSITION_NOTIFIER);
-#endif
 	ehci_reset (ehci);
 	ehci_writel(ehci, 0, &ehci->regs->intr_enable);
 	spin_unlock_irq(&ehci->lock);
 
+#ifdef CONFIG_CPU_FREQ
+	cpufreq_unregister_notifier(&ehci->cpufreq_transition,
+				    CPUFREQ_TRANSITION_NOTIFIER);
+#endif
 	/* let companion controllers work when we aren't */
 	ehci_writel(ehci, 0, &ehci->regs->configured_flag);
 
_

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atom ..., Andrew Morton, (Fri May 25, 3:00 pm)
[linux-usb-devel] [PATCH] bug removing ehci-hcd, Stuart_Hayes, (Thu May 31, 8:26 am)
Re: [linux-usb-devel] [PATCH] bug removing ehci-hcd, Satyam Sharma, (Wed Jun 6, 10:52 pm)
Re: [linux-usb-devel] [PATCH] bug removing ehci-hcd, Satyam Sharma, (Wed Jun 6, 11:14 pm)