block: blk_rq_map_kern uses the bounce buffers for stack buffers
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 4 Jul 2008 07:31:11 +0000 (09:31 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 4 Jul 2008 07:52:13 +0000 (09:52 +0200)
commit30c00eda73d5db5bd64dd0c370161abd8df5ba4a
tree87b5a34323eb98edf504e51b2d8e0291559579e3
parent27f8221af406e43b529a5425bc99c9b1e9bdf521
block: blk_rq_map_kern uses the bounce buffers for stack buffers

blk_rq_map_kern is used for kernel internal I/Os. Some callers use
this function with stack buffers but DMA to/from the stack buffers
leads to memory corruption on a non-coherent platform.

This patch make blk_rq_map_kern uses the bounce buffers if a caller
passes a stack buffer (on the all platforms for simplicity).

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