Skip to content

Commit

Permalink
[ALSA] hda-intel - Fix race in remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jun 22, 2006
1 parent 29463df commit f079c25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f079c25

Please sign in to comment.