]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] usbaudio: prevent oops & dead keyboard on usb unplugging while the device...
authorGregor Jasny <gjasny@web.de>
Thu, 28 Apr 2005 07:26:48 +0000 (09:26 +0200)
committer <chrisw@vas.sous-sol.org> <>
Fri, 27 May 2005 04:20:07 +0000 (21:20 -0700)
Summary: prevent oops & dead keyboard on usb unplugging while the device is being used

Without this patch, some usb kobjects, which are parents to
the usx2y's kobjects can be freed before the usx2y's.
This led to an oops in get_kobj_path_length() and a dead
keyboard, when the usx2y's kobjects were freed.
The patch ensures the correct sequence.
Tested ok on kernel 2.6.12-rc2.

Present in ALSA cvs

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
sound/usb/usbaudio.c

index e7520f99054c7e65216fd0cb9fe562a0644a8fcb..5ea025155db9a59e1039537d40588e8309ad2e0a 100644 (file)
@@ -3276,7 +3276,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
                }
                usb_chip[chip->index] = NULL;
                up(&register_mutex);
-               snd_card_free_in_thread(card);
+               snd_card_free(card);
        } else {
                up(&register_mutex);
        }