From owner-freebsd-net Sun Sep 23 16:41: 8 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 6572E37B41F for ; Sun, 23 Sep 2001 16:41:06 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f8NNd9Y01766; Sun, 23 Sep 2001 18:39:09 -0500 (CDT) (envelope-from jlemon) Date: Sun, 23 Sep 2001 18:39:09 -0500 From: Jonathan Lemon To: "Matthew N. Dodd" Cc: Jonathan Lemon , net@freebsd.org Subject: Re: review request. Message-ID: <20010923183909.A79251@prism.flugsvamp.com> References: <200109231714.f8NHE5080834@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: 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, Sep 23, 2001 at 07:32:18PM -0400, Matthew N. Dodd wrote: > 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. Because all it does is conceal the original error. Better to catch the mistake and fix the driver than paper it over. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message