kern/78227: Destroying a network interface leaks kernel memory
Gleb Smirnoff
glebius at FreeBSD.org
Thu Mar 10 06:40:17 GMT 2005
The following reply was made to PR kern/78227; it has been noted by GNATS.
From: Gleb Smirnoff <glebius at FreeBSD.org>
To: Brooks Davis <brooks at one-eyed-alien.net>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: kern/78227: Destroying a network interface leaks kernel memory
Date: Thu, 10 Mar 2005 09:38:50 +0300
On Wed, Mar 09, 2005 at 08:02:41AM -0800, Brooks Davis wrote:
B> > I like OpenBSD's solution. Please look at the attached patch; it
B> > adds in_multi pointer into in_ifaddr, assigns it return value of
B> > in_addmulti() and calls in_delmulti() when removing address.
B>
B> This looks fine to me.
B>
B> > P.S. I suspect we also have a memory leak when interface is joined a
B> > multicast group and then destroyed.
B>
B> Actually, I believe it's a panic. :( I haven't had a chance to look at
B> it much, but I put what I found in kern/77665. It's pretty easy to
B> trigger if you have a pccard/cardbus nic.
Yes yes. I have looked at this PR also. In OpenBSD they have a LIST_HEAD in
in_ifaddr for all multicast addresses. However, I see that it is LIST_INITed
at initialization and all multicast addresses are LIST_INSERTed there, but
I don't see where they are removed. I don't have OpenBSD box to play with and
try to reproduce your panic.
I think kern/77665 should be fixed next after this PR.
--
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
More information about the freebsd-bugs
mailing list