From owner-freebsd-net Tue Jun 5 5:51:12 2001 Delivered-To: freebsd-net@freebsd.org Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by hub.freebsd.org (Postfix) with ESMTP id 4C4F837B401 for ; Tue, 5 Jun 2001 05:51:05 -0700 (PDT) (envelope-from jesper@skriver.dk) Received: by freesbee.wheel.dk (Postfix, from userid 1001) id 5A0415D84; Tue, 5 Jun 2001 14:51:04 +0200 (CEST) Date: Tue, 5 Jun 2001 14:51:04 +0200 From: Jesper Skriver To: freebsd-net@FreeBSD.org Subject: leaking route structures, please review Message-ID: <20010605145104.A68594@skriver.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-PGP-Fingerprint: 6B88 9CE8 66E9 E631 C9C5 5EB4 22AB F0EC F956 1C31 X-PGP-Public-Key: http://freesbee.wheel.dk/~jesper/gpgkey.pub Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I've been looking at PR kern/25421, where Mark Smith 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