aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-cd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index d99847157186..d6667c36568c 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1195,6 +1195,7 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
1195 int mask = drive->queue->dma_alignment; 1195 int mask = drive->queue->dma_alignment;
1196 unsigned long addr = 1196 unsigned long addr =
1197 (unsigned long)page_address(bio_page(rq->bio)); 1197 (unsigned long)page_address(bio_page(rq->bio));
1198 unsigned long stack_mask = ~(THREAD_SIZE - 1);
1198 1199
1199 info->dma = drive->using_dma; 1200 info->dma = drive->using_dma;
1200 1201
@@ -1206,6 +1207,10 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
1206 */ 1207 */
1207 if ((rq->data_len & 15) || (addr & mask)) 1208 if ((rq->data_len & 15) || (addr & mask))
1208 info->dma = 0; 1209 info->dma = 0;
1210
1211 if (!((addr & stack_mask) ^
1212 ((unsigned long)current->stack & stack_mask)))
1213 info->dma = 0;
1209 } 1214 }
1210 1215
1211 /* start sending the command to the drive */ 1216 /* start sending the command to the drive */