> On 6 Mar 2016, at 9:53 PM, Tobias Ulmer <tobi...@tmux.org> wrote: > > map is passed straight into free where it gets overwritten with junk. > No other arch makes map invalid before free, and my N2100 didn't > suddenly misbehave either. > > ok?
ok > > Index: arch/arm/arm/bus_dma.c > =================================================================== > RCS file: /home/vcs/cvs/openbsd/src/sys/arch/arm/arm/bus_dma.c,v > retrieving revision 1.28 > diff -u -p -r1.28 bus_dma.c > --- arch/arm/arm/bus_dma.c 16 Nov 2014 12:30:56 -0000 1.28 > +++ arch/arm/arm/bus_dma.c 6 Mar 2016 11:34:35 -0000 > @@ -164,15 +164,6 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus > printf("dmamap_destroy: t=%p map=%p\n", t, map); > #endif /* DEBUG_DMA */ > > - /* > - * Explicit unload. > - */ > - map->dm_mapsize = 0; > - map->dm_nsegs = 0; > - map->_dm_origbuf = NULL; > - map->_dm_buftype = ARM32_BUFTYPE_INVALID; > - map->_dm_proc = NULL; > - > free(map, M_DEVBUF, 0); > } > >