[alsa-devel] [PATCH] USB-sound: prevent kernel panic on disconnect
clemens at ladisch.de
Thu Feb 17 14:52:08 CET 2011
Sarah Sharp wrote:
> On Mon, Feb 14, 2011 at 06:39:00PM +0100, Takashi Iwai wrote:
> > Clemens Ladisch wrote:
> > > There seems to be a race between snd_usb_pcm_close() and
> > > snd_usb_stream_disconnect(). I think a mutex taken by both functions
> > > should fix this; and all functions that check 'shutdown' probably need
> > > serializing.
> > Or, rather make sure that snd_usb_release_substreams() is finished
> > before PCM close; actually it should be called in hw_free callback,
> > but currently it's skipped by the shutdown flag check. I guess this
> > check isn't right.
> > The serialization of shutdown check is a good point, but this won't
> > hit actual bugs, I suppose.
> Ok. I don't have the audio expertise to make a patch; can you or
> Clemens make one for Pierre to try out?
I'll try to make a patch until tomorrow.
More information about the Alsa-devel