ALSA: ua101: fix crash when unplugging
commitc52e585cf03d3faa89ace0368bf66a3298e66a8b
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:36:50 +0000 (11 09:36 -0800)
treed712020ef2ec9f04c13d45590101a3e442401a2f
parent5796ee30587cb5f887a7fe6182c2bbcc3d31f0ad
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