Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2003 10:38:31 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Review needed: Mbuf double-free detection patch
Message-ID:  <20030501103520.S6445@odysseus.silby.com>
In-Reply-To: <20030501041210.A3514@xorpc.icir.org>
References:  <20030430142532.F3741@odysseus.silby.com> <20030501041210.A3514@xorpc.icir.org>

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

On Thu, 1 May 2003, Luigi Rizzo wrote:

> as Bosko noticed, it would be a good idea to make the change to subr_mbuf.c
> conditionally compiled under DIAGNOSTIC or INVARIANTS or the like.

Hsu already convinced me to put it under INVARIANTS in private mail.

> I was actually wondering if you have caught already any bug
> with this code enabled.

Nope, not yet.  I was just trying to figure out how mbuf free list
corruption could occur, and a double-free seemed to be an obvious thing to
try.  Once I found how much it messed things up, I came up with this
patch.

> [on a side note, it is a bit depressing to see the same
> code replicated twice, in m_free() and m_freem(). Couldn't
> one try to make m_freem() just call m_free() in a loop and
> save some code bloat ? I doubt the extra function call
> would harm performance too much.]
>
> 	cheers
> 	luigi

Someone seems to have placed a SEP field around that paragraph, I'm having
trouble reading it. :)

Mike "Silby" Silbersack



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