ide: avoid DMA on the stack for REQ_TYPE_ATA_PC
commit0b6abc17700a7843b165c677da0ac94522f83083
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Wed, 16 Jul 2008 18:33:35 +0000 (16 20:33 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Wed, 16 Jul 2008 18:33:35 +0000 (16 20:33 +0200)
treec347a4a03941731e4df26196fb52feb7492fac23
parent84e0f3f6c1e26588fdcb9f1b0f99d0275229bc99
ide: avoid DMA on the stack for REQ_TYPE_ATA_PC

Some REQ_TYPE_ATA_PC commands uses the stack buffers for DMA, which
leads to memory corruption on a non-coherent platform.

With regard to alignment and padding, ide-cd has the the dma safe
check for sg requests and REQ_TYPE_ATA_PC. This adds the stack buffer
check to that check.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-cd.c