]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
authorTakashi Iwai <tiwai@suse.de>
Wed, 15 Aug 2012 10:32:00 +0000 (12:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 16:59:37 +0000 (09:59 -0700)
commitcaecd86a5109f3417e349f42886dfb48d067c3c0
treec6637d26770fca575c5dba555ec54ed6401ca2b9
parent96f7b21cab02436e0757de03a9633cc85cc8f1cf
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream

commit e9ba389c5ffc4dd29dfe17e00e48877302111135 upstream.

A PCM capture stream on usb-audio causes a scheduling-while-atomic
BUG, as reported in the bugzilla entry below.  It's because
snd_usb_endpoint_start() is called at first at trigger START for a
capture stream, and this function contains the left-over EP
deactivation codes.  The problem doesn't happen for a playback stream
because the function is called at PCM prepare time, which can sleep.

This patch fixes the BUG by moving the EP deactivation code into the
PCM prepare callback.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/endpoint.c
sound/usb/pcm.c