Date: Wed, 30 Apr 2003 16:51:46 -0700 (PDT) From: Archie Cobbs <archie@dellroad.org> To: Mike Silbersack <silby@silby.com> Cc: freebsd-net@FreeBSD.ORG Subject: Re: Review needed: Mbuf double-free detection patch Message-ID: <200304302351.h3UNpkBa077257@arch20m.dellroad.org> In-Reply-To: <20030430142532.F3741@odysseus.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Silbersack wrote: > I'd be interested in comments on the attached patch from anyone who's been > doing work with network drivers & such. All it does is add a M_FREELIST > flag which is set whenever a mbuf is freed. If m_free or m_freem find > this flag to be set, they will panic, as this is a clear sign that the > mbuf was freed twice. (All flags are cleared whenever a mbuf is > taken off the freelist, so false M_FREELIST hits shouldn't occur.) Without reviewing the patch, I like the idea a whole lot. We added similar sanity checks at Vernier and they were very helpful. -Archie __________________________________________________________________________ Archie Cobbs * Precision I/O * http://www.precisionio.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304302351.h3UNpkBa077257>