From owner-cvs-all@FreeBSD.ORG Thu Apr 15 13:43:50 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 665BD16A4CE; Thu, 15 Apr 2004 13:43:50 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3260943D45; Thu, 15 Apr 2004 13:43:50 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i3FKgrkS020802; Thu, 15 Apr 2004 13:42:57 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i3FKgpgZ020796; Thu, 15 Apr 2004 13:42:51 -0700 Date: Thu, 15 Apr 2004 13:42:51 -0700 From: Brooks Davis To: Luigi Rizzo Message-ID: <20040415204251.GA18850@Odin.AC.HMC.Edu> References: <200404152031.i3FKVBlD095276@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: <200404152031.i3FKVBlD095276@repoman.freebsd.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: cvs-src@FreeBSD.org cc: src-committers@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 ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2004 20:43:50 -0000 --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--