[ALSA] Fix possible races at free_irq in PCI drivers
The irq handler of PCI drivers must be released before releasing other resources since the handler for a shared irq can be still called and may access the freed resource again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@ -1852,15 +1852,16 @@ static irqreturn_t snd_echo_interrupt(int irq, void *dev_id)
|
||||
static int snd_echo_free(struct echoaudio *chip)
|
||||
{
|
||||
DE_INIT(("Stop DSP...\n"));
|
||||
if (chip->comm_page) {
|
||||
if (chip->comm_page)
|
||||
rest_in_peace(chip);
|
||||
snd_dma_free_pages(&chip->commpage_dma_buf);
|
||||
}
|
||||
DE_INIT(("Stopped.\n"));
|
||||
|
||||
if (chip->irq >= 0)
|
||||
free_irq(chip->irq, chip);
|
||||
|
||||
if (chip->comm_page)
|
||||
snd_dma_free_pages(&chip->commpage_dma_buf);
|
||||
|
||||
if (chip->dsp_registers)
|
||||
iounmap(chip->dsp_registers);
|
||||
|
||||
|
Reference in New Issue
Block a user