Skip to content

Commit

Permalink
ide: ide_unregister() locking bugfix
Browse files Browse the repository at this point in the history
Holding ide_lock for ide_release_dma_engine() call is unnecessary
and triggers WARN_ON(irqs_disabled()) in dma_free_coherent().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 5, 2008
1 parent bd8a59e commit 2b54ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ void ide_unregister(ide_hwif_t *hwif)
blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
kfree(hwif->sg_table);
unregister_blkdev(hwif->major, hwif->name);
spin_lock_irq(&ide_lock);

if (hwif->dma_base)
ide_release_dma_engine(hwif);

spin_lock_irq(&ide_lock);
/* restore hwif data to pristine status */
ide_init_port_data(hwif, hwif->index);

spin_unlock_irq(&ide_lock);

mutex_unlock(&ide_cfg_mtx);
}

Expand Down

0 comments on commit 2b54ed9

Please sign in to comment.