Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2005 16:00:06 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-current@freebsd.org
Cc:        "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
Subject:   Re: Locking for ef(4)
Message-ID:  <200508221600.07740.jhb@FreeBSD.org>
In-Reply-To: <20050820192601.GA945@freebsd.czest.pl>
References:  <20050820192601.GA945@freebsd.czest.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508221600.07740.jhb>