]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
busdma: Add an internal BUS_DMA_FORCE_MAP flag to x86 bounce_busdma
authorMark Johnston <markj@FreeBSD.org>
Tue, 10 Aug 2021 21:11:43 +0000 (17:11 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 11 Aug 2021 01:27:54 +0000 (21:27 -0400)
commit3a1802fef4b535d22b7f0d3fa6e0bc2de5003922
treec63524c7575126497d357ba1583b4d00a0aa4927
parent1263022e3922f9b73c79f7f0fe34c0dfed86fb25
busdma: Add an internal BUS_DMA_FORCE_MAP flag to x86 bounce_busdma

Use this flag to indicate that busdma should allocate a map structure
even no bouncing is required to satisfy the tag's constraints.  This
will be used for KMSAN.

Also fix a memory leak that can occur if the kernel fails to allocate
bounce pages in bounce_bus_dmamap_create().

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31338
sys/x86/x86/busdma_bounce.c