From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 20:16:03 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47A5C16A41F for ; Mon, 22 Aug 2005 20:16:03 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD7C343D46 for ; Mon, 22 Aug 2005 20:16:02 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 22 Aug 2005 16:31:08 -0400 From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 22 Aug 2005 16:00:06 -0400 User-Agent: KMail/1.8 References: <20050820192601.GA945@freebsd.czest.pl> In-Reply-To: <20050820192601.GA945@freebsd.czest.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508221600.07740.jhb@FreeBSD.org> Cc: "Wojciech A. Koszek" Subject: Re: Locking for ef(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 20:16:03 -0000 On Saturday 20 August 2005 03:26 pm, Wojciech A. Koszek wrote: > Hello, > > Could someone look at my patch, which fixes ef(4) (locking > + properly free allocated memory): > > http://freebsd.czest.pl/dunstan/FreeBSD/diff.locking.if_ef.c > (PR: kern/85086). > > Please remember that your src/sys/net/if.c version has to be > at least 1.244. You might want to consider using MTX_SYSINIT() to initialize your mutex instead of manually doing it in your module handler routine. Either that or go ahead and push the calls to mtx_init() and mtx_destroy() into ef_load() and ef_unload() so all the load stuff happens in one function, etc. Might also want to check for whitespace breakage in your diffs. In ef_detach() you replaced the empty line before ether_ifdetach() with a line that contains just a tab. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org