summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-07-13 20:06:54 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-24 20:35:27 -0700
commite8967dfa4074fef1a114169b58ba05730165d143 (patch)
tree6519945473c1cfe91cc138f8ed3ab75474ebaf78
parent7dd9dac03853e21bcc38f681bf01a890c24e1d15 (diff)
ALSA: hda-intel - Fix race in remove
Call iounmap after free_irq to avoid invalid accesses in the shared irq. The patch is taken from https://bugzilla.novell.com/show_bug.cgi?id=167869 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--sound/pci/hda/hda_intel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e821d65afa11..9dd541df60d2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1393,10 +1393,10 @@ static int azx_free(struct azx *chip)
msleep(1);
}
- if (chip->remap_addr)
- iounmap(chip->remap_addr);
if (chip->irq >= 0)
free_irq(chip->irq, (void*)chip);
+ if (chip->remap_addr)
+ iounmap(chip->remap_addr);
if (chip->bdl.area)
snd_dma_free_pages(&chip->bdl);