From: Tejun Heo This patch fixes ide_dma_intr() oops which occurs for TASKFILE ioctl using DMA dataphses. This is against the latest ide-dev-2.6 tree + all your recent 9 patches. Signed-off-by: Tejun Heo Signed-off-by: Andrew Morton --- 25-akpm/drivers/ide/ide-dma.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff -puN drivers/ide/ide-dma.c~ide-ide_dma_intr-oops-fix drivers/ide/ide-dma.c --- 25/drivers/ide/ide-dma.c~ide-ide_dma_intr-oops-fix 2005-03-02 20:21:54.000000000 -0800 +++ 25-akpm/drivers/ide/ide-dma.c 2005-03-02 20:21:54.000000000 -0800 @@ -175,10 +175,14 @@ ide_startstop_t ide_dma_intr (ide_drive_ if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) { if (!dma_stat) { struct request *rq = HWGROUP(drive)->rq; - ide_driver_t *drv; - drv = *(ide_driver_t **)rq->rq_disk->private_data;; - drv->end_request(drive, 1, rq->nr_sectors); + if (rq->rq_disk) { + ide_driver_t *drv; + + drv = *(ide_driver_t **)rq->rq_disk->private_data;; + drv->end_request(drive, 1, rq->nr_sectors); + } else + ide_end_request(drive, 1, rq->nr_sectors); return ide_stopped; } printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n", _