Re: Mbuf double-free guilty party detection patch

From: Mike Silbersack <silby_at_silby.com>
Date: Fri, 24 Jun 2005 21:55:34 -0500 (CDT)
By the way, the subject of this e-mail should be "use after free", not 
"double-free" - oops.

Mike "Silby" Silbersack

On Fri, 24 Jun 2005, Mike Silbersack wrote:

>
> The attached patch stores the address of who freed an mbuf/cluster/whatever 
> inside it, then prints that address when panicing. You can then feed that 
> address into "x 0xwhatever" in DDB to see who the semi-guilty party is.
>
> Two flaws in the patch as is:
>
> - It's messy and not compatible with non-i386, cleanups are needed.
>
> - If the mbuf in question is part of a mbuf chain, we'll see m_freem as the 
> guilty party, because it called m_free.
>
> So, if you're one of the people seeing panics due to mbufs being used after 
> free, please try applying the patch and see what results you get. If you keep 
> getting m_freem as the previous user, then I'll have to enhance it to work 
> around that.
>
> Mike "Silby" Silbersack
Received on Sat Jun 25 2005 - 00:55:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC