Locking for ef(4)
John Baldwin
jhb at FreeBSD.org
Mon Aug 22 20:16:03 GMT 2005
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
More information about the freebsd-current
mailing list