lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 May 2007 09:33:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	<Stuart_Hayes@...l.com>
Cc:	<gregkh@...e.de>, <malattia@...ux.it>,
	<linux-kernel@...r.kernel.org>, <dbrownell@...rs.sourceforge.net>,
	<linux-usb-devel@...ts.sourceforge.net>
Subject: Re: [2.6.22-rc1-mm1] ehci-hcd - BUG: scheduling while atomic:
 rmmod/0x00000001/4568

On Tue, 29 May 2007 10:14:35 -0500 <Stuart_Hayes@...l.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@...ux-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@...ts.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@...e.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);
>  
> _
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ