[alsa-devel] [PATCH] ALSA: usb - prevent kernel panic on disconnect

Torsten Schenk torsten.schenk at zoho.com
Thu Feb 10 03:17:27 CET 2011


Hello,

I encountered a similar problem while developing drivers for the dmx 6fire usb. Perhaps my finding could provide you with some more information about the kernel panic. I found out that if the device is removed,
the isoc-packet status indicate an error in the in-urb-retire method; the urb status still is 0. This happens a few ms before the actual disconnect() handler is called.
I also looked into the snd-usb-audio driver and could not find any isoc-packet status check. Maybe this could lead to inconsistencies between PCM stream state
and urbs.

Greets, Torsten

---- On Wed, 09 Feb 2011 20:13:24 +0100 Pierre-Louis Bossart  wrote ---- 

>Fix 100% reproducible kernel panic when a USB audio device is 
>disconnected during playback. When the PCM substream is NULL, any 
>dereference causes a kernel panic. This isn't a recent problem, the crash 
>happened with a 2.6.35 kernel as well 
> 
>Note that this is only a work-around, it does not address the 
>root cause of this inconsistency between urbs and PCM states. The 
>dmesg below shows two calls to snd_urb_complete, the substream is 
>NULL and the state is either running or stopped. This doesn't make 
>any sense. 
> 
>Thanks to Sarah Sharp  for her 
>help. 



More information about the Alsa-devel mailing list