Date: Tue, 5 Jun 2001 11:13:27 -0400 (EDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Jesper Skriver <jesper@skriver.dk> Cc: freebsd-net@FreeBSD.ORG Subject: leaking route structures, please review Message-ID: <200106051513.LAA87829@khavrinen.lcs.mit.edu> In-Reply-To: <20010605145104.A68594@skriver.dk> References: <20010605145104.A68594@skriver.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 5 Jun 2001 14:51:04 +0200, Jesper Skriver <jesper@skriver.dk> said: > Since rt was the cached route of the pcb, the ref count is >= 1 > since the pcb will have a ref count on it. In the case of a dynamic > route, in_losing calls rtrequest to delete the route but not rtfree. > rtrequest() only deletes the route from the routing table. It does > not free the route structure unless rt_refcnt is 0. This is correct. We can't have it rip the route out from under any number of PCBs and other routes which may have it referenced. > We know it won't be zero because the pcb has a ref count. As a > result it appears that we leak a route structure since it will never > be freed. No, the next time that route structure is used, the lack of an RTF_UP flag on the route will be noted, and the reference will be dropped before rtalloc() is called to find the new correct route. If you want the references to be dropped sooner, either send more traffic or close your connections more frequently. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106051513.LAA87829>