From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751191AbVHXRCO (ORCPT ); Wed, 24 Aug 2005 13:02:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751197AbVHXRCN (ORCPT ); Wed, 24 Aug 2005 13:02:13 -0400 Received: from ns2.suse.de ([195.135.220.15]:51645 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1751191AbVHXRCL (ORCPT ); Wed, 24 Aug 2005 13:02:11 -0400 Date: Wed, 24 Aug 2005 19:01:58 +0200 Message-ID: From: Takashi Iwai To: Lee Revell Cc: Ted Unangst , linux-kernel@vger.kernel.org, alsa-devel Subject: Re: some missing spin_unlocks In-Reply-To: <1124899018.3855.5.camel@mindpipe> References: <430A5127.5000304@coverity.com> <1124899018.3855.5.camel@mindpipe> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta18) (chestnut) (+CVS-20041021) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 24 Aug 2005 11:56:58 -0400, Lee Revell wrote: > > [added alsa-devel to cc:] > > On Mon, 2005-08-22 at 15:26 -0700, Ted Unangst wrote: > > I think these are all real bugs. > > > > sound/synth/emux/emux_synth.c snd_emux_note_on, line 101 > > snd_assert will return without unlocking emu->voice_lock (line 89) > > This one is probably a real bug. The patch below fixes them (already applied to ALSA CVS tree). ================================================================ [PATCH] Fix missing spin_unlock Fixed missing spin_unlock. Signed-off-by: Takashi Iwai --- linux/sound/pci/au88x0/au88x0_pcm.c:1.9 Thu Aug 18 05:43:12 2005 +++ linux/sound/pci/au88x0/au88x0_pcm.c Wed Aug 24 09:57:25 2005 @@ -220,8 +220,10 @@ vortex_adb_allocroute(chip, -1, params_channels(hw_params), substream->stream, type); - if (dma < 0) + if (dma < 0) { + spin_unlock_irq(&chip->lock); return dma; + } stream = substream->runtime->private_data = &chip->dma_adb[dma]; stream->substream = substream; /* Setup Buffers. */ --- linux/sound/synth/emux/emux_synth.c:1.11 Tue Dec 7 07:36:07 2004 +++ linux/sound/synth/emux/emux_synth.c Wed Aug 24 09:57:25 2005 @@ -98,7 +98,6 @@ vp = emu->ops.get_voice(emu, port); if (vp == NULL || vp->ch < 0) continue; - snd_assert(vp->emu != NULL && vp->hw != NULL, return); if (STATE_IS_PLAYING(vp->state)) emu->ops.terminate(vp);