MIPS busdma map questions

Adrian Chadd adrian at freebsd.org
Wed Aug 29 03:43:01 UTC 2012


On 28 August 2012 20:24, Warner Losh <imp at bsdimp.com> wrote:
>
> On Aug 28, 2012, at 8:22 PM, Adrian Chadd wrote:
>
>> Hi,
>>
>> I have a couple of busdma map questions.
>>
>> #1 - in mips/mips/busdma_machdep.c, bus_dmamap_destroy() calls
>> _busdma_free_dmamap() and -then- goes and walks the dma map list. Is
>> this a good idea or not? :)
>
> Accessing free memory after freeing it is a free ticket to a free dose of free pain.  It should be freed after the if that checks to see if it is in use.

Excellent! Who knows busdma better than I and can wade through what
that code path is doing? :)



Adrian


More information about the freebsd-mips mailing list