From: Takashi Iwai Date: Thu, 1 Jun 2006 09:42:14 +0000 (+0200) Subject: [ALSA] hda-intel - Fix race in remove X-Git-Tag: v2.6.18-rc1~1081^2~274 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f079c25ab8a7d223875c5bac9b23b484e4a18f88;p=platform%2Fkernel%2Flinux-exynos.git [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 --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 0154389..4070b5c 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -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);