From: Takashi Iwai Subject: Re: USX2Y 2.6.20-rt2 Oops on disconnect Date: Tue, 06 Feb 2007 12:53:42 +0100 Message-ID: References: <20070205065636.GA1652@elte.hu> <200702051525.49465.fzu@wemgehoertderstaat.de> <49143.192.168.1.8.1170712006.squirrel@www.rncbc.org> <200702052327.06365.annabellesgarden@yahoo.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200702052327.06365.annabellesgarden@yahoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Karsten Wiese Cc: alsa-devel@lists.sourceforge.net, Rui Nuno Capela List-Id: alsa-devel@alsa-project.org At Mon, 5 Feb 2007 23:27:06 +0100, Karsten Wiese wrote: > > Hi Takashi, > > had some oopses here running -rt kernels, > which vanished after applying this. It wasn't included in 2.6.20, so likely this may be the cause. You can also try either the latest alsa-driver from HG tree or the alsa.git mm branch, both of which include this fix. Takashi > > Karsten > ------------------------------------------------------------------- > snd_hwdep_release() racefix > > > snd_card_file_remove() can free the snd_card. > Touch hw->* only before calling snd_card_file_remove(). > > Unrelated: Allow hwdep devices not to have own ops.release(); > > > Signed-off-by: Karsten Wiese > > > --- /alsa-kernel/core/hwdep.c_ 2007-01-30 20:32:01.000000000 +0100 > +++ /alsa-kernel/core/hwdep.c 2007-01-30 20:32:01.000000000 +0100 > @@ -156,15 +156,16 @@ > int err = -ENXIO; > struct snd_hwdep *hw = file->private_data; > struct module *mod = hw->card->module; > + > mutex_lock(&hw->open_mutex); > - if (hw->ops.release) { > + if (hw->ops.release) > err = hw->ops.release(hw, file); > - wake_up(&hw->open_wait); > - } > if (hw->used > 0) > hw->used--; > - snd_card_file_remove(hw->card, file); > mutex_unlock(&hw->open_mutex); > + wake_up(&hw->open_wait); > + > + snd_card_file_remove(hw->card, file); > module_put(mod); > return err; > } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642