History

[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

Karsten Wiese committed 21 years ago

Commit efa93db1 parent 9a476961 file · +1 −1Browse files

Unified · Split

sound/usb/usbaudio.c+1−1
@@ -3289,7 +3289,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) · 3288 unmodified lines
32893289 }
32903290 usb_chip[chip->index] = NULL;
32913291 up(&register_mutex);
3292− snd_card_free_in_thread(card);
3292+ snd_card_free(card);
32933293 } else {
32943294 up(&register_mutex);
32953295 }