Date: Tue, 5 Jun 2001 14:51:04 +0200 From: Jesper Skriver <jesper@skriver.dk> To: freebsd-net@FreeBSD.org Subject: leaking route structures, please review Message-ID: <20010605145104.A68594@skriver.dk>
next in thread | raw e-mail | index | archive | help
Hi, I've been looking at PR kern/25421, where Mark Smith <msmith@netapp.com> have found a problem where we're leaking route structure, his fix (http://people.FreeBSD.org/~jesper/pcb.diff) looks good to me, but could you please have a look, as I'm not too familiar with this part of the code. His reasoning: 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. 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. /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work: Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. 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?20010605145104.A68594>