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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to