From owner-cvs-all@FreeBSD.ORG Thu Aug 4 14:39:47 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3A9A16A41F; Thu, 4 Aug 2005 14:39:47 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9495543D49; Thu, 4 Aug 2005 14:39:47 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j74EdlkW092185; Thu, 4 Aug 2005 14:39:47 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j74Edl9D092184; Thu, 4 Aug 2005 14:39:47 GMT (envelope-from jhb) Message-Id: <200508041439.j74Edl9D092184@repoman.freebsd.org> From: John Baldwin Date: Thu, 4 Aug 2005 14:39:47 +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.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2005 14:39:48 -0000 jhb 2005-08-04 14:39:47 UTC FreeBSD src repository Modified files: sys/net if.c Log: Initialize the if_addr mutex in if_alloc() rather than waiting until if_attach(). This allows ethernet drivers to use it in their routines to program their MAC filters before ether_ifattach() is called (de(4) is one such driver). Also, the if_addr mutex is destroyed in if_free() rather than if_detach(), so there was another potential bug in that a driver that failed during attach and called if_free() without having called ether_ifattach() would have tried to destroy an uninitialized mutex. Reported by: Holm Tiffe holm at freibergnet dot de Discussed with: rwatson Revision Changes Path 1.240 +1 -1 src/sys/net/if.c