Re: Locking for ef(4)

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 22 Aug 2005 16:00:06 -0400
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_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Mon Aug 22 2005 - 18:16:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC