mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
riscv: very large dma mappings can cause integer overflow
Fix the return type for _bus_dmamap_addseg(). Based on the same fix done for arm64 in r348571. Sponsored by: Axiado
This commit is contained in:
parent
e7b2173d0b
commit
3bebdc0564
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365245
|
@ -633,7 +633,7 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags)
|
|||
/*
|
||||
* Add a single contiguous physical range to the segment list.
|
||||
*/
|
||||
static int
|
||||
static bus_size_t
|
||||
_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
|
||||
bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue