Date: Wed, 2 Sep 2020 11:33:31 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365245 - head/sys/riscv/riscv Message-ID: <202009021133.082BXVp7058210@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Wed Sep 2 11:33:31 2020 New Revision: 365245 URL: https://svnweb.freebsd.org/changeset/base/365245 Log: 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 Modified: head/sys/riscv/riscv/busdma_bounce.c Modified: head/sys/riscv/riscv/busdma_bounce.c ============================================================================== --- head/sys/riscv/riscv/busdma_bounce.c Wed Sep 2 11:18:21 2020 (r365244) +++ head/sys/riscv/riscv/busdma_bounce.c Wed Sep 2 11:33:31 2020 (r365245) @@ -633,7 +633,7 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmam /* * 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009021133.082BXVp7058210>