dma-mapping: check pfn validity in dma_common_{mmap,get_sgtable}
Check that the pfn returned from arch_dma_coherent_to_pfn refers to a valid page and reject the mmap / get_sgtable requests otherwise. Based on the arm implementation of the mmap and get_sgtable methods. Signed-off-by: NChristoph Hellwig <hch@lst.de> Tested-by: NVignesh Raghavendra <vigneshr@ti.com>
Showing
想要评论请 注册 或 登录