aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/ddb.h
diff options
context:
space:
mode:
authorSvatopluk Kraus <skra@FreeBSD.org>2015-11-21 19:55:01 +0000
committerSvatopluk Kraus <skra@FreeBSD.org>2015-11-21 19:55:01 +0000
commit6fa7734d6fbbec1e34bfee33427969ac9a92ff80 (patch)
treea2f950be9ed45eef9d36916983f76f162e19fe58 /sys/ddb/ddb.h
parent3bf2363dca0c66c10256e5f6d6f29fae42171930 (diff)
downloadsrc-6fa7734d6fbbec1e34bfee33427969ac9a92ff80.tar.gz
src-6fa7734d6fbbec1e34bfee33427969ac9a92ff80.zip
Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
created for bus_dma_tag_t tag, bounce pages should be allocated only if needed. Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed, it could cause memory exhaustion when a lot of such tags together with their maps were created. Note that there could be more maps in one tag by current design. However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after bounce pages are allocated. Thus, they are allocated only for first tag's map which needs them. Approved by: kib (mentor)
Notes
Notes: svn path=/head/; revision=291142
Diffstat (limited to 'sys/ddb/ddb.h')
0 files changed, 0 insertions, 0 deletions