]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:25 +0000 (07:41 -0700)
commit8b49768d5fd8f4365fd9de0151c3c4190e9aa4e3
tree5aa9c3845190bf214db1ec8c6c18ba56a10b6c00
parent017583503d42172a6d1759eb08bfabbb4d462894
ALSA: usb - Fix Oops after usb-midi disconnection

commit 29aac005ff4dc8a5f50b80f4e5c4f59b21c0fb50 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/usb/usbmidi.c