]> git.baikalelectronics.ru Git - kernel.git/commit
dma-mapping: Add vmap checks to dma_map_single()
authorKees Cook <keescook@chromium.org>
Tue, 29 Oct 2019 21:34:22 +0000 (14:34 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 30 Oct 2019 18:09:25 +0000 (11:09 -0700)
commit4ffa8f03cb2a56c56be45358c68cae34861e1d4f
tree6d42b0f294019db3f3934284a1fe4f5ebd7cd585
parent77fd5a0dcdbdf0d4bddf8685856e7abe3fd539e4
dma-mapping: Add vmap checks to dma_map_single()

As we've seen from USB and other areas[1], we need to always do runtime
checks for DMA operating on memory regions that might be remapped. This
adds vmap checks (similar to those already in USB but missing in other
places) into dma_map_single() so all callers benefit from the checking.

[1] https://git.kernel.org/linus/9386c3e3fc54a4ef858215d12c36f391079e9bab

Suggested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
[hch: fixed the printk message]
Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/dma-mapping.h