aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-07 12:44:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-17 13:14:22 -0800
commitea7b69a0b6816926e85cedbe5e1b1b8d3e2e5500 (patch)
treec034a629ba5e24f47b4cbbacea08de4a87f0d5c9 /sound/usb/usbaudio.h
parent61bc2855cf2e28f7ef3928c04453daa07dfffd9b (diff)
downloadkernel_samsung_smdk4412-ea7b69a0b6816926e85cedbe5e1b1b8d3e2e5500.zip
kernel_samsung_smdk4412-ea7b69a0b6816926e85cedbe5e1b1b8d3e2e5500.tar.gz
kernel_samsung_smdk4412-ea7b69a0b6816926e85cedbe5e1b1b8d3e2e5500.tar.bz2
ALSA: usb-audio: Fix races at disconnection
commit 978520b75f0a1ce82b17e1e8186417250de6d545 upstream. Close some races at disconnection of a USB audio device by adding the chip->shutdown_mutex and chip->shutdown check at appropriate places. The spots to put bandaids are: - PCM prepare, hw_params and hw_free - where the usb device is accessed for communication or get speed, in mixer.c and others; the device speed is now cached in subs->speed instead of accessing to chip->dev The accesses in PCM open and close don't need the mutex protection because these are already handled in the core PCM disconnection code. The autosuspend/autoresume codes are still uncovered by this patch because of possible mutex deadlocks. They'll be covered by the upcoming change to rwsem. Also the mixer codes are untouched, too. These will be fixed in another patch, too. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/usbaudio.h')
0 files changed, 0 insertions, 0 deletions