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)
commit051913dada046ac948eb6f48c0717fc25de2a917
treeddb00a84cd989614acff2e425f4aba5c23231fd9
parentbe3f4ae0c0c56aab903aceaceed4b9d8418e180e
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