Initialize the bounce pages list in armv[4|6] DMA maps.

Fixes the crash on the first use of STAILQ_INSERT_TAIL() in
add_bounce_page().

Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Luiz Otavio O Souza 2019-12-24 23:43:29 +00:00
parent c094263a24
commit 18346de0cc
2 changed files with 2 additions and 0 deletions

View file

@ -669,6 +669,7 @@ allocate_map(bus_dma_tag_t dmat, int mflags)
return (NULL);
}
map->segments = (bus_dma_segment_t *)((uintptr_t)map + mapsize);
STAILQ_INIT(&map->bpages);
return (map);
}

View file

@ -735,6 +735,7 @@ allocate_map(bus_dma_tag_t dmat, int mflags)
return (NULL);
}
map->segments = (bus_dma_segment_t *)((uintptr_t)map + mapsize);
STAILQ_INIT(&map->bpages);
return (map);
}