Date: Thu, 15 Apr 2004 13:42:51 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Luigi Rizzo <luigi@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: 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 ... Message-ID: <20040415204251.GA18850@Odin.AC.HMC.Edu> In-Reply-To: <200404152031.i3FKVBlD095276@repoman.freebsd.org> References: <200404152031.i3FKVBlD095276@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 15, 2004 at 01:31:11PM -0700, Luigi Rizzo wrote: > luigi 2004/04/15 13:31:11 PDT >=20 > FreeBSD src repository >=20 > Modified files: > sys/dev/arl if_arl.c=20 > sys/dev/cs if_cs.c=20 > sys/dev/ed if_ed.c=20 > sys/dev/ex if_ex.c=20 > sys/dev/fe if_fe.c=20 > sys/dev/lnc if_lnc.c=20 > sys/dev/sbni if_sbni.c=20 > sys/dev/sn if_sn.c=20 > sys/dev/wl if_wl.c=20 > sys/dev/xe if_xe.c=20 > Log: > Remove improper use of if_addrhead in device drivers to check > if the link-level address has been initialized already. > =20 > 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 --=20 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 --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAfvPIXY6L6fI4GtQRApLSAJ4yUlNWYTA3iLp+1X+fl13/iHH+hgCg0siH 8OHRriGFHL3VnupFo+n+yi4= =aRP7 -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040415204251.GA18850>