From owner-freebsd-arch Tue Feb 12 15:39: 5 2002 Delivered-To: freebsd-arch@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id C7E5037B400 for ; Tue, 12 Feb 2002 15:38:56 -0800 (PST) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id g1CNa9324735; Tue, 12 Feb 2002 15:36:09 -0800 Date: Tue, 12 Feb 2002 15:36:09 -0800 From: Brooks Davis To: Maxime Henrion Cc: freebsd-arch@freebsd.org, Brooks Davis Subject: Re: Patches to if_loop + the interface cloning framework Message-ID: <20020212153609.D24768@Odin.AC.HMC.Edu> References: <20020212154828.A25374@sneakerz.org> <20020212143909.B24768@Odin.AC.HMC.Edu> <20020212165544.B25374@sneakerz.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="ylS2wUBXLOxYXZFQ" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020212165544.B25374@sneakerz.org>; from mux@sneakerz.org on Tue, Feb 12, 2002 at 04:55:44PM -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ylS2wUBXLOxYXZFQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 12, 2002 at 04:55:44PM -0600, Maxime Henrion wrote: > Brooks Davis (brooks@one-eyed-alien.net) wrote: > > By and large it looks good so far. I've got a couple minor issues > > though. First, I think we should at least KASSERT and probably > > just panic if lo_clone_create() failes in loop_modevent since that > > causes the same problem as deleting lo0. >=20 > I see your concern but this raises some other questions : if it is so > bad that we have to panic if we're not be able to create the lo0 interfac= e, > then why do we have if_loop available as a module at all ? I'm all for > having a KASSERT() or a panic() in that case, but I'd rather see it in a > SYSINIT after having removed KLD support. You can't make if_loop a module because the kernel will have an unresolved symbol (loif) if you do at this point. The main reasion I suggested a panic was that, you'd know immediatly that you didn't have a loopback device. It looks to me like you'll quickly derefrence a NULL pointer in one of the IPv6 SYSINITs if you don't have a valid loif. At the very least there needs to be a printf here saying allocation failed. I'd argue that there's pretty much no chance of recovery if it does because that's the result of failing to malloc a pretty minimal amount of memory and thus that a panic is the right thing to do, but I guess I don't care that much. Now that I look at the code again, locreate() does no error checking what so ever which is probably a bigger issue (and not your fault). -- 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 --ylS2wUBXLOxYXZFQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8aabpXY6L6fI4GtQRAmzQAJ9MazAPB6BdOC43ujxSH23PHygUvgCeIlcM y+vxvcd9cQO5peZVnXwz5aA= =VzT/ -----END PGP SIGNATURE----- --ylS2wUBXLOxYXZFQ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message