Google
  Web www.spinics.net

Re: USB HCD: avoid duplicate local_irq_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, 25 Oct 2007, Greg KH wrote:

> On Tue, Oct 23, 2007 at 12:01:37AM -0400, Alan Stern wrote:
> > On Tue, 23 Oct 2007, Arnd Bergmann wrote:
> > 
> > > usb_hcd_flush_endpoint() has a retry loop that starts with a spin_lock_irq(),
> > > but only gives up the spinlock, not the irq_disable before jumping to the
> > > rescan label.
> > > 
> > > Split the spin_lock_irq into the retryable part and the local_irq_disable()
> > > that is only done once as a micro-optimization and slight cleanup.
> > 
> > I agree with your sentiment, but it would be better to solve this 
> > problem without using local_irq_disable().  The patch below does this.
> > 
> > ---
> > 
> > Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 
> Alan, is this something you want added to the tree and in before 2.6.24
> is out?

Yes.  It's a small thing, but we're better off keeping IRQ
enable/disable calls properly balanced.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux