]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ua101: fix crash when unplugging
authorClemens Ladisch <clemens@ladisch.de>
Sat, 15 Oct 2011 21:19:25 +0000 (23:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 6 Nov 2011 10:21:42 +0000 (11:21 +0100)
commit2be82e2344f22cd266d4e245efc561cbf70da58d
treec2b1afb1818dd722c7026ebd0047972a32845d20
parent86cfbbea8bfb3f6cfbbf765aa6082b70dff9424e
ALSA: ua101: fix crash when unplugging

If the device is unplugged while running, it is possible for a PCM
device to be closed after the disconnect callback has returned.  This
means that kill_stream_urb() and disable_iso_interface() would try to
access already-invalid or freed USB data structures.

The function free_usb_related_resources() was intended to prevent this,
but forgot to clear the affected variables.

Reported-and-tested-by: Olivier Courtay <olivier@courtay.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.33+ <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/misc/ua101.c