From: Takashi Iwai Subject: Re: [PATCH resend] ALSA: firewire-speakers: fix locking Date: Mon, 03 Oct 2011 10:09:32 +0200 Message-ID: References: <20110827164528.1b3a2fc0@stein> <20111001155746.53e902b9@stein> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 55A2D103879 for ; Mon, 3 Oct 2011 10:09:33 +0200 (CEST) In-Reply-To: <20111001155746.53e902b9@stein> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Stefan Richter Cc: alsa-devel@alsa-project.org, Clemens Ladisch List-Id: alsa-devel@alsa-project.org At Sat, 1 Oct 2011 15:57:46 +0200, Stefan Richter wrote: > > Date: Sat, 27 Aug 2011 16:45:28 +0200 > > There is a lock inversion between fwspk->mutex and pcm->open_mutex > reported by lockdep when fwspk_hw_free is called. > > Fixed by copying the fix from the same former issue in the isight > sound driver (commit f3f7c1837f6bcae3601fc535b339426868bf1549 > "ALSA: isight: fix locking"). > > Signed-off-by: Stefan Richter We should put cc to stable kernel, right? thanks, Takashi > --- > sound/firewire/speakers.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > Index: b/sound/firewire/speakers.c > =================================================================== > --- a/sound/firewire/speakers.c > +++ b/sound/firewire/speakers.c > @@ -772,9 +772,10 @@ static int __devexit fwspk_remove(struct > { > struct fwspk *fwspk = dev_get_drvdata(dev); > > - mutex_lock(&fwspk->mutex); > amdtp_out_stream_pcm_abort(&fwspk->stream); > snd_card_disconnect(fwspk->card); > + > + mutex_lock(&fwspk->mutex); > fwspk_stop_stream(fwspk); > mutex_unlock(&fwspk->mutex); > > @@ -790,8 +791,8 @@ static void fwspk_bus_reset(struct fw_un > fcp_bus_reset(fwspk->unit); > > if (cmp_connection_update(&fwspk->connection) < 0) { > - mutex_lock(&fwspk->mutex); > amdtp_out_stream_pcm_abort(&fwspk->stream); > + mutex_lock(&fwspk->mutex); > fwspk_stop_stream(fwspk); > mutex_unlock(&fwspk->mutex); > return; > > > -- > Stefan Richter > -=====-==-== =-=- ----= > http://arcgraph.de/sr/ >