From owner-freebsd-net Sun Sep 23 16:32:27 2001 Delivered-To: freebsd-net@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [64.0.106.45]) by hub.freebsd.org (Postfix) with ESMTP id 49BA237B439 for ; Sun, 23 Sep 2001 16:32:23 -0700 (PDT) Received: from localhost (winter@localhost) by sasami.jurai.net (8.9.3/8.8.7) with ESMTP id TAA84390; Sun, 23 Sep 2001 19:32:18 -0400 (EDT) Date: Sun, 23 Sep 2001 19:32:18 -0400 (EDT) From: "Matthew N. Dodd" To: Jonathan Lemon Cc: net@freebsd.org Subject: Re: review request. In-Reply-To: <200109231714.f8NHE5080834@prism.flugsvamp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, 23 Sep 2001, Jonathan Lemon wrote: > >sys/net/if.c and bpf.c have problems with if_detach() and > >bpfdetach() when they are called with a struct ifnet that has not had > >if_attach() and bpfattach() called on it. Null pointer reference -> > >*boom* etc. > > I would say that this is to be expected. Why is the system calling > the detach functions on a device that isn't attached in the first > place? Driver mistake, but I see no reason why these functions shouldn't handle this gracefully. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message