Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2019 23:43:29 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356065 - head/sys/arm/arm
Message-ID:  <201912242343.xBONhTtC097295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Tue Dec 24 23:43:29 2019
New Revision: 356065
URL: https://svnweb.freebsd.org/changeset/base/356065

Log:
  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)

Modified:
  head/sys/arm/arm/busdma_machdep-v4.c
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v4.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v4.c	Tue Dec 24 23:20:18 2019	(r356064)
+++ head/sys/arm/arm/busdma_machdep-v4.c	Tue Dec 24 23:43:29 2019	(r356065)
@@ -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);
 }
 

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v6.c	Tue Dec 24 23:20:18 2019	(r356064)
+++ head/sys/arm/arm/busdma_machdep-v6.c	Tue Dec 24 23:43:29 2019	(r356065)
@@ -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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912242343.xBONhTtC097295>