From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757757AbYDNKaT (ORCPT ); Mon, 14 Apr 2008 06:30:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752345AbYDNKaH (ORCPT ); Mon, 14 Apr 2008 06:30:07 -0400 Received: from ns.suse.de ([195.135.220.2]:33949 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbYDNKaF (ORCPT ); Mon, 14 Apr 2008 06:30:05 -0400 Date: Mon, 14 Apr 2008 12:30:03 +0200 Message-ID: From: Takashi Iwai To: Frederik Deweerdt Cc: Miles Lane , Andrew Morton , LKML , Jaroslav Kysela Subject: Re: 2.6.25-rc8-mm1 -- BUG: bad unlock balance detected! In-Reply-To: <20080403095819.GC7134@slug> References: <20080403095819.GC7134@slug> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 3 Apr 2008 11:58:19 +0200, Frederik Deweerdt wrote: > > [Trimmed CC a bit, add Takashi Iwai] > Hi, > On Wed, Apr 02, 2008 at 08:19:29AM -0400, Miles Lane wrote: > > [ 48.765906] [ BUG: bad unlock balance detected! ] > > [ 48.765912] ------------------------------------- > > [ 48.765918] pulseaudio/4277 is trying to release lock > > (&codec->spdif_mutex) at: > > [ 48.765930] [] mutex_unlock+0x8/0xa > > [ 48.765945] but there are no more locks to release! > > [ 48.765950] > > [ 48.765952] other info that might help us debug this: > > [ 48.765959] 2 locks held by pulseaudio/4277: > > [ 48.765965] #0: (&pcm->open_mutex){--..}, at: [] > > snd_pcm_open+0xc1/0x1ba [snd_pcm] > > [ 48.766003] #1: (&chip->open_mutex){--..}, at: [] > > azx_pcm_open+0x36/0x184 [snd_hda_intel] > > [ 48.766057] > > [ 48.766059] stack backtrace: > > [ 48.766066] Pid: 4277, comm: pulseaudio Not tainted 2.6.25-rc8-mm1 #12 > > [ 48.766086] [] print_unlock_inbalance_bug+0xce/0xd8 > > [ 48.766107] [] ? save_stack_trace+0x1d/0x3b > > [ 48.766130] [] ? __kernel_text_address+0x1b/0x27 > > [ 48.766146] [] ? dump_trace+0xcd/0xd9 > > [ 48.766160] [] ? save_stack_address+0x0/0x2c > > [ 48.766176] [] ? find_usage_backwards+0xa4/0xc3 > > [ 48.766193] [] lock_release_non_nested+0x84/0x120 > > [ 48.766209] [] ? mutex_unlock+0x8/0xa > > [ 48.766222] [] lock_release+0x16a/0x199 > > [ 48.766238] [] __mutex_unlock_slowpath+0xa9/0x121 > > [ 48.766252] [] mutex_unlock+0x8/0xa > > [ 48.766263] [] snd_hda_multi_out_analog_open+0xd3/0xef > > [snd_hda_intel] > The following patch should fix it. The buggy code comes from > git-alsa-tiwai.patch . > > Regards, > Frederik Thanks, applied to ALSA tree now. Takashi > > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > index 689d177..a6be6e3 100644 > --- a/sound/pci/hda/hda_codec.c > +++ b/sound/pci/hda/hda_codec.c > @@ -2665,8 +2665,8 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec, > if (mout->spdif_maxbps < hinfo->maxbps) > hinfo->maxbps = mout->spdif_maxbps; > } > + mutex_unlock(&codec->spdif_mutex); > } > - mutex_unlock(&codec->spdif_mutex); > return snd_pcm_hw_constraint_step(substream->runtime, 0, > SNDRV_PCM_HW_PARAM_CHANNELS, 2); > } >