Date: Tue, 28 Aug 2012 20:43:00 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: scottl@freebsd.org, freebsd-mips@freebsd.org Subject: Re: MIPS busdma map questions Message-ID: <CAJ-VmokHX7=Jd06tJWmAJfTGtuF4WfgpgGb0f0PwUzfP-QpJ0Q@mail.gmail.com> In-Reply-To: <1F780BF4-84C3-48D5-9832-EA32381969A6@bsdimp.com> References: <CAJ-VmomuwKKaQ6AszeDo-iQwL%2B8DPJpBB9av0K%2BVbaj2feHO7g@mail.gmail.com> <1F780BF4-84C3-48D5-9832-EA32381969A6@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28 August 2012 20:24, Warner Losh <imp@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokHX7=Jd06tJWmAJfTGtuF4WfgpgGb0f0PwUzfP-QpJ0Q>