[PATCH] [UBUNTU:sound/pci/cs46xx/] Fix deadlock inversion in dsp_spos_scb_lib.c::cs46xx_dsp_remove_scb()

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Fri Jul 7 01:08:58 UTC 2006


Subject: [PATCH] [UBUNTU:sound/pci/cs46xx/] Fix deadlock inversion in dsp_spos_scb_lib.c::cs46xx_dsp_remove_scb()

UpstreamStatus: Added in upstream alsa-kernel hg changeset 076afdd0291f
                http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=076afdd0291f6d549f501e6e2c7597f409b5217c;style=raw

From Arjan van de Ven <arjan at linux.intel.com>.

This diff applies to both Dapper and Edgy Linux sources.

Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>

---

 sound/pci/cs46xx/dsp_spos_scb_lib.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

59d1740dcecbc1182e7114e668893718ab465518
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index 92849e1..51e9cb9 100644
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c
@@ -174,6 +174,7 @@ static void _dsp_clear_sample_buffer (cs
 void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb)
 {
 	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	unsigned long flags;
 
 	/* check integrety */
 	snd_assert ( (scb->index >= 0 && 
@@ -188,9 +189,9 @@ void cs46xx_dsp_remove_scb (cs46xx_t *ch
 		     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 );
-- 
1.1.3


-- 
Daniel T. Chen            crimsun at ubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060706/be769e33/attachment.pgp>


More information about the kernel-team mailing list