From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:36:20 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3EA106566B; Tue, 29 Nov 2011 09:36:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id A1C5B8FC18; Tue, 29 Nov 2011 09:36:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAT9aIkM074518; Tue, 29 Nov 2011 13:36:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAT9aItR074517; Tue, 29 Nov 2011 13:36:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Nov 2011 13:36:18 +0400 From: Gleb Smirnoff To: Jaakko Heinonen Message-ID: <20111129093618.GA44498@FreeBSD.org> References: <201111281444.pASEixdO095604@svn.freebsd.org> <20111128202307.GA4064@jh> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20111128202307.GA4064@jh> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:36:20 -0000 On Mon, Nov 28, 2011 at 10:23:07PM +0200, Jaakko Heinonen wrote: J> On 2011-11-28, Bjoern A. Zeeb wrote: J> > > static void J> > > if_clone_free(struct if_clone *ifc) J> > > { J> > > - for (int bytoff = 0; bytoff < ifc->ifc_bmlen; bytoff++) { J> > > - KASSERT(ifc->ifc_units[bytoff] == 0x00, J> > > - ("ifc_units[%d] is not empty", bytoff)); J> > > - } J> > > J> > > KASSERT(LIST_EMPTY(&ifc->ifc_iflist), J> > > ("%s: ifc_iflist not empty", __func__)); J> > > J> > > IF_CLONE_LOCK_DESTROY(ifc); J> > > - free(ifc->ifc_units, M_CLONE); J> > > + delete_unrhdr(ifc->ifc_unrhdr); J> > > } J> J> delete_unrhdr() KASSERTs that all allocations has been freed. Thus if J> the leak below has occurred, the result will be a panic at this point J> with INVARIANTS enabled kernel. If INVARIANTS is disabled, a memory leak J> is possible. Thanks, Jaakko! Good catch. I will try to fix that. -- Totus tuus, Glebius.