Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] usbusx2y: 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>

authored by

Karsten Wiese and committed by
Linus Torvalds
dcf78d80 efa93dbe

+7 -4
+7 -4
sound/usb/usx2y/usbusx2y.c
··· 1 1 /* 2 2 * usbusy2y.c - ALSA USB US-428 Driver 3 3 * 4 + 2005-04-14 Karsten Wiese 5 + Version 0.8.7.2: 6 + Call snd_card_free() instead of snd_card_free_in_thread() to prevent oops with dead keyboard symptom. 7 + Tested ok with kernel 2.6.12-rc2. 8 + 4 9 2004-12-14 Karsten Wiese 5 10 Version 0.8.7.1: 6 11 snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open. ··· 148 143 149 144 150 145 MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>"); 151 - MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.1"); 146 + MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.2"); 152 147 MODULE_LICENSE("GPL"); 153 148 MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}"); 154 149 ··· 435 430 if (ptr) { 436 431 usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr); 437 432 struct list_head* p; 438 - if (usX2Y->chip_status == USX2Y_STAT_CHIP_HUP) // on 2.6.1 kernel snd_usbmidi_disconnect() 439 - return; // calls us back. better leave :-) . 440 433 usX2Y->chip.shutdown = 1; 441 434 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; 442 435 usX2Y_unlinkSeq(&usX2Y->AS04); ··· 446 443 } 447 444 if (usX2Y->us428ctls_sharedmem) 448 445 wake_up(&usX2Y->us428ctls_wait_queue_head); 449 - snd_card_free_in_thread((snd_card_t*)ptr); 446 + snd_card_free((snd_card_t*)ptr); 450 447 } 451 448 } 452 449