]> git.baikalelectronics.ru Git - kernel.git/commit
mmc_block: do not DMA to stack
authorBen Dooks <ben@simtec.co.uk>
Mon, 8 Jun 2009 22:33:57 +0000 (23:33 +0100)
committerPierre Ossman <pierre@ossman.eu>
Sat, 13 Jun 2009 20:43:01 +0000 (22:43 +0200)
commite14a62a7d67926ab78a77338e1ce57cb17431e76
treeddb00a84cd989614acff2e425f4aba5c23231fd9
parent0eb380bdb1e28f6df87de0499e8811bcd2e9cc62
mmc_block: do not DMA to stack

In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.

Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.

[ Changed to GFP_KERNEL allocation - Pierre Ossman ]

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
drivers/mmc/card/block.c