Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jun 2005 21:55:34 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        current@freebsd.org
Cc:        Thierry Herbelot <thierry@herbelot.com>
Subject:   Re: Mbuf double-free guilty party detection patch
Message-ID:  <20050624215504.L537@odysseus.silby.com>
In-Reply-To: <20050624212729.C537@odysseus.silby.com>
References:  <20050624212729.C537@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050624215504.L537>