]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb - Fix Oops after usb-midi disconnection
authorTakashi Iwai <tiwai@suse.de>
Sat, 10 Apr 2010 19:27:23 +0000 (21:27 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 10 Apr 2010 19:34:24 +0000 (21:34 +0200)
commita1ee5db89c72096636f3aacc527538868e22a37f
treeb6518159bd2f25187499f3094bf2302e381b3edd
parentd59ed661b33929a58d1048a095069350f290c1e0
ALSA: usb - Fix Oops after usb-midi disconnection

usb-midi causes sometimes Oops at snd_usbmidi_output_drain() after
disconnection.  This is due to the access to the endpoints which have
been already released at disconnection while the files are still alive.

This patch fixes the problem by checking disconnection state at
snd_usbmidi_output_drain() and by releasing urbs but keeping the
endpoint instances until really all freed.

Tested-by: Tvrtko Ursulin <tvrtko@ursulin.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usbmidi.c