From owner-cvs-src@FreeBSD.ORG Sun Sep 23 17:50:18 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3547316A417; Sun, 23 Sep 2007 17:50:18 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0EB6713C448; Sun, 23 Sep 2007 17:50:18 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8NHoHtT012644; Sun, 23 Sep 2007 17:50:17 GMT (envelope-from csjp@repoman.freebsd.org) Received: (from csjp@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8NHoHcg012643; Sun, 23 Sep 2007 17:50:17 GMT (envelope-from csjp) Message-Id: <200709231750.l8NHoHcg012643@repoman.freebsd.org> From: "Christian S.J. Peron" Date: Sun, 23 Sep 2007 17:50:17 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/net if_stf.c src/sys/netinet in_gif.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2007 17:50:18 -0000 csjp 2007-09-23 17:50:17 UTC FreeBSD src repository Modified files: sys/net if_stf.c sys/netinet in_gif.c Log: Certain consumers of rtalloc like gif(4) and if_stf(4) lookup the route and once they are done with it, call rtfree(). rtfree() should only be used when we are certain we hold the last reference to the route. This bug results in console messages like the following: rtfree: 0xc40f7000 has 1 refs This patch switches the rtfree() to use RTFREE_LOCKED() instead, which should handle the reference counting on the route better. Approved by: re@ (gnn) Reviewed by: bms Reported by: many via net@ and current@ Tested by: many Revision Changes Path 1.60 +2 -2 src/sys/net/if_stf.c 1.37 +2 -2 src/sys/netinet/in_gif.c