From: Andrew Morton <akpm@linux-foundation.org>
To: <Stuart_Hayes@Dell.com>
Cc: <gregkh@suse.de>, <malattia@linux.it>,
<linux-kernel@vger.kernel.org>, <dbrownell@users.sourceforge.net>,
<linux-usb-devel@lists.sourceforge.net>
Subject: Re: [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic: rmmod/0x00000001/4568
Date: Tue, 29 May 2007 09:33:24 -0700 [thread overview]
Message-ID: <20070529093324.92e571a0.akpm@linux-foundation.org> (raw)
In-Reply-To: <DFEF91B22ED07447AB6AA4B237F913F9524D51@ausx3mpc125.aus.amer.dell.com>
On Tue, 29 May 2007 10:14:35 -0500 <Stuart_Hayes@Dell.com> wrote:
>
> Sorry about that. Would it be helpful if I verified that and sent it in
> signed off?
>
Yes please. The question in my mind was "did it add a race": say, the
notifier chain gets called by some external source after we've gone and
reset the device?
>
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Friday, May 25, 2007 5:00 PM
> To: Greg KH
> Cc: Mattia Dongili; Linux Kernel Mailing List; Hayes, Stuart; David
> Brownell; linux-usb-devel@lists.sourceforge.net
> Subject: Re: [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic:
> rmmod/0x00000001/4568
>
> On Fri, 25 May 2007 14:40:05 -0700 Greg KH <gregkh@suse.de> wrote:
>
> > On Mon, May 21, 2007 at 11:44:37AM +0900, Mattia Dongili wrote:
> > > Hello,
> > >
> > > with gregkh-usb-usb-ehci-cpufreq-fix.patch removing ehci-hcd causes
> > > the following BUG:
> >
> > Thanks for letting me know.
> >
> > Stuart, any help here?
>
> 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);
>
> _
next prev parent reply other threads:[~2007-05-29 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 2:44 [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic: rmmod/0x00000001/4568 Mattia Dongili
2007-05-25 21:40 ` Greg KH
2007-05-25 22:00 ` Andrew Morton
2007-05-29 15:14 ` Stuart_Hayes
2007-05-29 16:33 ` Andrew Morton [this message]
2007-05-31 15:26 ` [linux-usb-devel] [PATCH] bug removing ehci-hcd Stuart_Hayes
2007-06-07 4:19 ` Greg KH
2007-06-07 5:52 ` Satyam Sharma
2007-06-07 6:14 ` Satyam Sharma
2007-06-07 23:16 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070529093324.92e571a0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Stuart_Hayes@Dell.com \
--cc=dbrownell@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=malattia@linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox