diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-28 12:24:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-02-23 07:37:56 -0800 |
commit | d13e7a58664e0e35db5e524176cb70143c7c07c2 (patch) | |
tree | d61ce67d2e298e202d968cbc11edde7d5254331d /sound | |
parent | 98baa75bcbacb200b7e4e0ee01b508f4d459d8ce (diff) | |
download | linux-stable-d13e7a58664e0e35db5e524176cb70143c7c07c2.tar.gz linux-stable-d13e7a58664e0e35db5e524176cb70143c7c07c2.tar.bz2 linux-stable-d13e7a58664e0e35db5e524176cb70143c7c07c2.zip |
ALSA: usb-audio - Avoid Oops after disconnect
commit 78b8d5d2ee280c463908fd75f3bdf246bcb6ac8d upstream.
As the release of substreams may be done asynchronously from the
disconnection, close callback needs to check the shutdown flag before
actually accessing the usb interface.
Reference: Novell bnc#505027
http://bugzilla.novell.com/show_bug.cgi?id=565027
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 8803d9d93f84..f26a1254b0bb 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -1936,7 +1936,7 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream, int direction) struct snd_usb_stream *as = snd_pcm_substream_chip(substream); struct snd_usb_substream *subs = &as->substream[direction]; - if (subs->interface >= 0) { + if (!as->chip->shutdown && subs->interface >= 0) { usb_set_interface(subs->dev, subs->interface, 0); subs->interface = -1; } |