projects/linux·commit efa93dbe

[PATCH] usbaudio: prevent oops & dead keyboard on usb unplugging while the device is being used

efa93dbe · Karsten Wiese <[email protected]> · 2005-06-14 09:54:55 -07:00

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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
efa93dbedd0e2eacf49ea6fff1fe4397d520cf61
Parents
9a476969

Changes

1 files changed · +1 −1

FileStatusAddDelContent
sound/usb/usbaudio.cmodified+1−1View file

sound/usb/usbaudio.c

View file
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 84b0bbd..aae6614 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)
}
usb_chip[chip->index] = NULL;
up(&register_mutex);
- snd_card_free_in_thread(card);
+ snd_card_free(card);
} else {
up(&register_mutex);
}