Re: [patch] fix AB-BA deadlock inversion at cs46xx_dsp_remove_scb

From: Duncan Sands
Date: Tue Jul 04 2006 - 06:02:10 EST


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 );
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/