Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 1999 13:06:34 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        John Polstra <jdp@polstra.com>
Cc:        wollman@khavrinen.lcs.mit.edu, current@freebsd.org
Subject:   Re: Route table leaks
Message-ID:  <199911291806.NAA35374@khavrinen.lcs.mit.edu>
In-Reply-To: <199911270141.RAA29416@vashon.polstra.com>
References:  <199911220150.UAA78559@khavrinen.lcs.mit.edu> <XFMail.991121195840.jdp@polstra.com> <199911221552.KAA84691@khavrinen.lcs.mit.edu> <199911270141.RAA29416@vashon.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Fri, 26 Nov 1999 17:41:49 -0800 (PST), John Polstra <jdp@polstra.com> said:

> The route disappears from the routing table, but it is
> not freed.  (The Leak.)

Actually, no.

> Now cause some packets to travel on the connection.  A new cloned
> route is created and added to the routing table.

Here is where the leak happens, as demonstrated by your patch.  (Great
detective work, BTW.)

> 1. Do I really need the splnet calls around RTFREE?

I don't think so.  All calls into the routing code should already be
protected by splnet.  We may have to revisit this in the future for
finer-grained locking.

> 2. To eliminate all the duplicated code, shall I make rtalloc just
> call rtalloc_ign(ro, 0UL)?  I assume that was avoided originally for
> performance reasons, but now there's more code than before.

Actually, it was avoided originally because it was easier to just cut
and paste.  There is no inherent reason for the duplication, although
Matt's suggestion of topologically sorting the routines so that GCC
will have a chance at inlining is not a bad one.  (I'd actually like
to find all the calls to rtalloc() and simply add an extra argument to
them.  I can't fathom why I didn't do that five years ago....)

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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