Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Sep 2001 11:47:08 +0200
From:      Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
To:        "Matthew N. Dodd" <winter@jurai.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: review request.
Message-ID:  <20010923114707.H4995@daemon.ninth-circle.org>
In-Reply-To: <Pine.BSF.4.21.0109230534170.3806-200000@sasami.jurai.net>
References:  <Pine.BSF.4.21.0109230534170.3806-200000@sasami.jurai.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-On [20010923 11:38], Matthew N. Dodd (winter@jurai.net) 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.
>
>This patch fixes the test already present in bpfdetach() and adds a test
>to if_detach().

Patch looks sane to me.
Basically it is a combination of asserting and defensive programming,
which never hurts.

-- 
Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|freebsd.org|xmach.org]
Documentation nutter/C-rated Coder, finger asmodai@ninth-circle.dnsalias.net
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/
At the End of the Rainbow, with Gold in our hands...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010923114707.H4995>