Re: [PATCH] arm64: mm: check virtual addr in virt_to_page() if CONFIG_DEBUG_VIRTUAL=y

2019-04-16 Thread Catalin Marinas
On Tue, Apr 16, 2019 at 01:36:36AM +0800, Miles Chen wrote: > This change uses the original virt_to_page() (the one with __pa()) to > check the given virtual address if CONFIG_DEBUG_VIRTUAL=y. > > Recently, I worked on a bug: a driver passes a symbol address to > dma_map_single() and the virt_to_p

[PATCH] arm64: mm: check virtual addr in virt_to_page() if CONFIG_DEBUG_VIRTUAL=y

2019-04-15 Thread Miles Chen
This change uses the original virt_to_page() (the one with __pa()) to check the given virtual address if CONFIG_DEBUG_VIRTUAL=y. Recently, I worked on a bug: a driver passes a symbol address to dma_map_single() and the virt_to_page() (called by dma_map_single()) does not work for non-linear addres