mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Duncan Sands <duncan.sands@math.u-psud.fr>
To: Arjan van de Ven <arjan@infradead.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] fix AB-BA deadlock inversion at cs46xx_dsp_remove_scb
Date: Tue, 4 Jul 2006 12:03:14 +0200	[thread overview]
Message-ID: <200607041203.15106.duncan.sands@math.u-psud.fr> (raw)
In-Reply-To: <1152005720.3109.30.camel@laptopd505.fenrus.org>

Yes, that fixes it.  However

> +	unsignded long flags;

should be "unsigned":

Index: Linux/sound/pci/cs46xx/dsp_spos_scb_lib.c
===================================================================
--- Linux.orig/sound/pci/cs46xx/dsp_spos_scb_lib.c	2006-07-04 10:09:05.778370000 +0200
+++ Linux/sound/pci/cs46xx/dsp_spos_scb_lib.c	2006-07-04 11:53:18.353662891 +0200
@@ -180,6 +180,7 @@
 void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
 {
 	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	unsigned long flags;
 
 	/* check integrety */
 	snd_assert ( (scb->index >= 0 && 
@@ -194,9 +195,9 @@
 		     goto _end);
 #endif
 
-	spin_lock(&scb->lock);
+	spin_lock_irqsave(&scb->lock, flags);
 	_dsp_unlink_scb (chip,scb);
-	spin_unlock(&scb->lock);
+	spin_unlock_irqrestore(&scb->lock, flags);
 
 	cs46xx_dsp_proc_free_scb_desc(scb);
 	snd_assert (scb->scb_symbol != NULL, return );

      parent reply	other threads:[~2006-07-04 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04  9:15 possible irq lock " Duncan Sands
2006-07-04  9:35 ` [patch] fix AB-BA deadlock " Arjan van de Ven
2006-07-04  9:58   ` Ingo Molnar
2006-07-04 10:03   ` Duncan Sands [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607041203.15106.duncan.sands@math.u-psud.fr \
    --to=duncan.sands@math.u-psud.fr \
    --cc=akpm@osdl.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®