Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Jun 2006 13:38:31 -0500
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        Benno Rice <benno@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/ath if_ath.c src/sys/dev/ipw if_ipw.c src/sys/dev/iwi if_iwi.c src/sys/dev/ral rt2560.c rt2661.c       src/sys/dev/usb if_ural.c src/sys/dev/wi if_wi.c src/sys/net bpf.c     bpf.h bpfdesc.h if_disc.c if_gif.c if_gre.c if_loop.c if_sl.c ...
Message-ID:  <448328A7.3060604@FreeBSD.org>
In-Reply-To: <4481112F.5080807@FreeBSD.org>
References:  <200606021959.k52JxXlr022148@repoman.freebsd.org> <4481112F.5080807@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Can you try this patch:

http://people.freebsd.org/~csjp/no.bpf.1149425152.diff

and tell me how it works for you?


Benno Rice wrote:
> Christian S.J. Peron wrote:
>
> [snip]
>
>>   Log:
>>   Fix the following bpf(4) race condition which can result in a panic:
>
> [snip]
>
> This change causes panics in kernels that don't have device bpf present.
> The attached patch fixes this.
>
> ------------------------------------------------------------------------
>
> Index: bpf.h
> ===================================================================
> RCS file: /home/ncvs/src/sys/net/bpf.h,v
> retrieving revision 1.41
> diff -u -r1.41 bpf.h
> --- bpf.h	2 Jun 2006 19:59:32 -0000	1.41
> +++ bpf.h	3 Jun 2006 04:31:10 -0000
> @@ -630,7 +630,11 @@
>  bpf_peers_present(struct bpf_if *bpf)
>  {
>  
> +#if defined(DEV_BPF) || defined(NETGRAPH_BPF)
>  	return !LIST_EMPTY(&bpf->bif_dlist);
> +#else
> +	return (0);
> +#endif
>  }
>  
>  #define	BPF_TAP(_ifp,_pkt,_pktlen) do {				\
>   


-- 
Christian S.J. Peron
csjp@FreeBSD.ORG
FreeBSD Committer
FreeBSD Security Team




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