From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: ALSA: usb-audio: fix oops due to cleanup race when disconnecting Date: Wed, 23 Feb 2011 00:54:51 +0100 Message-ID: References: <4D58EDA9.2020805@ladisch.de> <20110216235422.GB6375@xanatos> <4D63800E.30509@ladisch.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: pl bossart Cc: Clemens Ladisch , Sarah Sharp , alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alan Stern List-Id: alsa-devel@alsa-project.org At Tue, 22 Feb 2011 16:19:20 -0600, pl bossart wrote: >=20 > >> Ah, I forgot to put my sign-off since I was waiting for any test > >> result... =C2=A0Has anyone tried it? > > > > Doesn't work for me. same oops as before. Either I made a mistake w= hen > > merging this patch manually (there were some rejects), or the probl= em > > is still there. >=20 > Added some additional traces, the dereference takes place before the > mutex is unlocked. >=20 > usb 3-1: USB disconnect, address 5 > ALSA card.c:556: locking USB shutdown mutex > ALSA urb.c:492: frame 0 active: -84 > ALSA urb.c:197: cannot submit urb (err =3D -19) > ALSA urb.c:492: frame 0 active: -84 > ALSA urb.c:197: cannot submit urb (err =3D -19) > ALSA urb.c:492: frame 0 active: -84 > ALSA urb.c:197: cannot submit urb (err =3D -19) > ALSA urb.c:492: frame 0 active: -84 > ALSA urb.c:197: cannot submit urb (err =3D -19) > ALSA urb.c:186: NULL substream (subs->running 0) > ALSA urb.c:186: NULL substream (subs->running 0) > ALSA card.c:575: UNlocking USB shutdown mutex Hmm. Is snd_usb_release_substream_urbs() is called properly before these errors? Is force=3D1 set? Also, in your log, it shows subs->running =3D 0. So, there is no NULL dereference. But, it's still strange since all active URLs must have been killed beforehand in deactivate_urbs() and the succeeding call of wait_clear_urbs()... Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html