From owner-p4-projects@FreeBSD.ORG Wed Oct 8 15:42:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 92B7216A4C0; Wed, 8 Oct 2003 15:42:31 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5694316A4B3 for ; Wed, 8 Oct 2003 15:42:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4375043F85 for ; Wed, 8 Oct 2003 15:42:30 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98MgUXJ002386 for ; Wed, 8 Oct 2003 15:42:30 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98MgTnA002383 for perforce@freebsd.org; Wed, 8 Oct 2003 15:42:29 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 8 Oct 2003 15:42:29 -0700 (PDT) Message-Id: <200310082242.h98MgTnA002383@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39381 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 22:42:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=39381 Change 39381 by sam@sam_ebb on 2003/10/08 15:42:19 correct locking issues in nd6_lookup; this stuff is still very far from right (won't get to it until locking all ipv6) Affected files ... .. //depot/projects/netperf/sys/netinet6/nd6.c#8 edit Differences ... ==== //depot/projects/netperf/sys/netinet6/nd6.c#8 (text+ko) ==== @@ -822,7 +822,6 @@ RTFREE_LOCKED(rt); rt = 0; } - RT_UNLOCK(rt); } if (!rt) { if (create && ifp) { @@ -859,6 +858,7 @@ ip6_sprintf(addr6), e); if (rt == NULL) return (NULL); + RT_LOCK(rt); if (rt->rt_llinfo) { struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo; @@ -867,6 +867,7 @@ } else return (NULL); } + RT_LOCK_ASSERT(rt); rt->rt_refcnt--; /* * Validation for the entry. @@ -888,8 +889,10 @@ ip6_sprintf(addr6), ifp ? if_name(ifp) : "unspec"); /* xxx more logs... kazu */ } + RT_UNLOCK(rt); return (NULL); } + RT_UNLOCK(rt); /* XXX not ready to return rt locked */ return (rt); }