ALSA: ua101: fix crash when unplugging
commit427d615a29d6d629c843f2e0756a0cacd3844f22
authorClemens Ladisch <clemens@ladisch.de>
Sat, 15 Oct 2011 21:19:25 +0000 (15 23:19 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:44:02 +0000 (11 09:44 -0800)
treeba20557ee9bd3cece8b7980d7ade288616b0910a
parente2e70d61f72a03751e0b44e4d2630ce5fdf158c4
ALSA: ua101: fix crash when unplugging

commit 862a6244eb9f9f5123fe819454fcfcae0ee1f2f9 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/usb/misc/ua101.c