Skip to content

Commit

Permalink
[PATCH] usbaudio: prevent oops & dead keyboard on usb unplugging whil…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
Karsten Wiese authored and Linus Torvalds committed Jun 14, 2005
1 parent 9a47696 commit efa93db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit efa93db

Please sign in to comment.