From: Huang Shijie Date: Wed, 18 Dec 2013 15:41:00 +0000 (+0800) Subject: mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf X-Git-Tag: v3.14-rc1~65^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ff76a920e3558307567b45aa0a91fb914924bfc;p=pandora-kernel.git mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf The buffer pointer passed from the upper layer may points to a buffer in the stack or a buffer allocated by vmalloc, and etc.. This patch adds more sanity check to this buffer. After this patch, if we meet a buffer which is allocated by vmalloc or a buffer in the stack, we will use our own DMA buffer @data_buffer_dma to do the DMA operations. If the buffer is not the cases above, we will map it for DMA operations directly. Signed-off-by: Huang Shijie Signed-off-by: Brian Norris --- Reading git-diff-tree failed