diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2005-06-14 12:54:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-14 14:05:13 -0400 |
commit | efa93dbedd0e2eacf49ea6fff1fe4397d520cf61 (patch) | |
tree | 2fc2f2f52d2509bb73d6aa847c4fc8a8a188e0bc /sound | |
parent | 9a47696970bc8233818d370011e2fddae5cfce9f (diff) |
[PATCH] usbaudio: 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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 84b0bbddbd22..aae66144d411 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -3289,7 +3289,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) | |||
3289 | } | 3289 | } |
3290 | usb_chip[chip->index] = NULL; | 3290 | usb_chip[chip->index] = NULL; |
3291 | up(®ister_mutex); | 3291 | up(®ister_mutex); |
3292 | snd_card_free_in_thread(card); | 3292 | snd_card_free(card); |
3293 | } else { | 3293 | } else { |
3294 | up(®ister_mutex); | 3294 | up(®ister_mutex); |
3295 | } | 3295 | } |