Re: [REGRESSION] 2.6.24/25: random lockups when accessing external USB harddrive

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: ext Alan Stern <stern@...>, <linux-kernel@...>, <linux-usb@...>
Date: Wednesday, June 25, 2008 - 11:52 am

Hi,

ext Alan Stern wrote:

Well, I guess I'm just lucky it didn't turn into a heisenbug with all 
those printk's in the code :-)


Unfortunately I could only run a small test today. I added some simple 
debugging code for the spinlock usage in hcd.c (see attached diff) and I 
get the following message at lockup (I tried it twice just to be sure):

HCD URB list locked by usb_hcd_link_urb_to_ep!

As far as I understand the matter this only can happen if 
usb_hcd_link_urb_to_ep() gets interrupted while holding the spinlock. 
But according to the contract at the header of the function it should be 
called with interrupts disabled!

I guess the obvious way forward from here is:

  - replace the spin_lock() in the function with the irqsave version

  - if that fixes the problem add debugging code to the function and 
panic with a stack trace when the interrupts aren't disabled one entry 
(don't know how to detect that yet, any suggestions?) That hopefully 
identifies the culprit that calls the function with interrupts enabled.

Regards,

	Stefan

---
Stefan Becker
E-Mail: Stefan.Becker@nokia.com
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [REGRESSION] 2.6.24/25: random lockups when accessing ex..., Stefan Becker, (Wed Jun 25, 11:52 am)
BUG in 2.6.26-rc8 interrupt handling, Becker Stefan (Nokia-D/Salo)..., (Sat Jun 28, 3:34 pm)
Re: BUG in 2.6.26-rc8 interrupt handling, David Brownell, (Sat Jun 28, 3:51 pm)
PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts, Stefan Becker, (Sun Jun 29, 10:57 am)
Re: [PATCH] USB: fix interrupt disabling for HCDs with share..., Leonardo Chiquitto, (Tue Jul 1, 10:19 am)
Re: PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts, Henrique de Moraes Holschuh..., (Mon Jun 30, 10:28 am)