ALSA: usb-audio: Fix regression by disconnection-race-fix patch
authorTakashi Iwai <tiwai@suse.de>
Tue, 22 Jan 2013 16:43:40 +0000 (17:43 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:56 +0000 (04:33 +0000)
commit6d3e269cd51bdfe7ea77bdf1242626a5d6529b85
treee92287ba9b32a9902be9233caf8f7949b8dabb45
parentc64640b5e1b8e83307e3f7e86044a858c7584593
ALSA: usb-audio: Fix regression by disconnection-race-fix patch

[NOTE: the regression below is found only in 3.2-3.4 stable trees, so
       there is no upstream commit corresponding to this patch]

The recent fix for the race at disconnection of usb-audio devices
(upstream commit 978520b7) triggers Oops when a device is unplugged
while playing on 3.2 and 3.4 kernels.  The culprit is that the
shutdown flag check was wrongly added around the urb deactivation code
snippet.  The urb deactivation code has to be performed even after the
device disconnected.  Otherwise it remains undead and pokes the wild
access in the end.

The regression fix is simply reverting the shutdown flag check in that
code.

Reported-and-tested-by: Chris J Arges <christopherarges@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/usb/endpoint.c