ALSA: line6: Fix racy loopback handling
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Jan 2015 11:50:44 +0000 (12:50 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Jan 2015 06:22:23 +0000 (07:22 +0100)
commit3d3ae4454deb94bbad9ad0b2b559cbf6c0db4ec2
tree6d8e7f46288f73c352cfcedbaca9212524a4b11d
parentd6ca69d82522cb0e59777deea3673c85c7db7f45
ALSA: line6: Fix racy loopback handling

The impulse and monitor handling in submit_audio_out_urb() isn't
protected thus this can be racy with the capture stream handling.
This patch extends the range to protect via each stream's spinlock
(now the whole submit_audio_*_urb() are covered), and take the capture
stream lock additionally for the impulse and monitor handling part.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/capture.c
sound/usb/line6/playback.c