From: Bartlomiej Zolnierkiewicz Date: Sat, 5 Jul 2008 18:30:51 +0000 (+0200) Subject: ide: ide_unregister() locking bugfix X-Git-Tag: v2.6.26-rc9~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b54ed9467697b0ce2d60d89e5e4253c9e322c26;p=platform%2Fkernel%2Flinux-stable.git ide: ide_unregister() locking bugfix 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 --- diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index b31359c..300431d 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -352,15 +352,15 @@ void ide_unregister(ide_hwif_t *hwif) blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<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); }