cvs commit: src/sys/dev/arl if_arl.c src/sys/dev/cs if_cs.c src/sys/dev/ed if_ed.c src/sys/dev/ex if_ex.c src/sys/dev/fe if_fe.c src/sys/dev/lnc if_lnc.c src/sys/dev/sbni if_sbni.c src/sys/dev/sn if_sn.c src/sys/dev/wl if_wl.c src/sys/dev/xe ...

Brooks Davis brooks at
Thu Apr 15 13:43:50 PDT 2004

On Thu, Apr 15, 2004 at 01:31:11PM -0700, Luigi Rizzo wrote:
> luigi       2004/04/15 13:31:11 PDT
>   FreeBSD src repository
>   Modified files:
>     sys/dev/arl          if_arl.c 
>     sys/dev/cs           if_cs.c 
>     sys/dev/ed           if_ed.c 
>     sys/dev/ex           if_ex.c 
>     sys/dev/fe           if_fe.c 
>     sys/dev/lnc          if_lnc.c 
>     sys/dev/sbni         if_sbni.c 
>     sys/dev/sn           if_sn.c 
>     sys/dev/wl           if_wl.c 
>     sys/dev/xe           if_xe.c 
>   Log:
>   Remove improper use of if_addrhead in device drivers to check
>   if the link-level address has been initialized already.
>   The majority of modern drivers never does this and works fine, which
>   makes me think that the check is totally unnecessary and a residue
>   of cut&paste from other drivers.

I suspect I know where this came from.  Until rev 1.177 of net/if.c,
there was an assumption that creating the ifaddr for the lladdr could
fail due to a malloc failure in if_attach.  These drivers were probably
programming based on the assumption that this check could fail.  Since
malloc was called with M_WAITOK this shouldn't be possiable and so
I removed the check there while redoing the allocation for interface
renaming support.  In reality, given the fact that if_attach can't fail
(since it has a void return) the check should have resulted in a panic
rather then attaching an unusable interface.

-- Brooks

Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the cvs-src mailing list