]> err.no Git - linux-2.6/commitdiff
[ALSA] hda-intel - Fix race in remove
authorTakashi Iwai <tiwai@suse.de>
Thu, 1 Jun 2006 09:42:14 +0000 (11:42 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:07 +0000 (21:34 +0200)
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>
sound/pci/hda/hda_intel.c

index 0154389bf95b93a81ad491f9f30ce052fddd129d..4070b5cd9b6bac4e000899a88ff54765a2870e18 100644 (file)
@@ -1402,10 +1402,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);