From owner-p4-projects@FreeBSD.ORG Sat May 9 02:45:30 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 143351065672; Sat, 9 May 2009 02:45:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CFE106566B for ; Sat, 9 May 2009 02:45:29 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B7C108FC17 for ; Sat, 9 May 2009 02:45:29 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n492jT0l066042 for ; Sat, 9 May 2009 02:45:29 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n492jTRR066040 for perforce@freebsd.org; Sat, 9 May 2009 02:45:29 GMT (envelope-from zec@fer.hr) Date: Sat, 9 May 2009 02:45:29 GMT Message-Id: <200905090245.n492jTRR066040@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 161808 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 02:45:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=161808 Change 161808 by zec@zec_tpx32 on 2009/05/09 02:44:36 Use ifnet_byindex_locked() instead of ifnet_byindex() when holding the global ifnet lock. Affected files ... .. //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#37 edit Differences ... ==== //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#37 (text+ko) ==== @@ -134,7 +134,8 @@ IFNET_WLOCK(); ifnet_setbyindex(ifp->if_index, NULL); - while (V_if_index > 0 && ifnet_byindex(V_if_index) == NULL) + while (V_if_index > 0 && \ + ifnet_byindex_locked(V_if_index) == NULL) V_if_index--; IFNET_WUNLOCK(); } while (0); @@ -147,7 +148,7 @@ */ IFNET_WLOCK(); for (ifp->if_index = 1; ifp->if_index <= V_if_index; ifp->if_index++) { - if (ifnet_byindex(ifp->if_index) == NULL) + if (ifnet_byindex_locked(ifp->if_index) == NULL) break; } /* Catch if_index overflow. */