cvs commit: src/sys/amd64/amd64 bpf_jit_machdep.c bpf_jit_machdep.h src/sys/conf files files.amd64 files.i386 options.amd64 options.i386 src/sys/i386/i386 bpf_jit_machdep.c bpf_jit_machdep.h src/sys/net bpf.c bpf_jitter.c bpf_jitter.h bpfdesc.h

Christian S.J. Peron csjp at FreeBSD.org
Mon Dec 5 19:20:08 PST 2005


On Tue, Dec 06, 2005 at 02:58:12AM +0000, Jung-uk Kim wrote:
>   
>   Revision  Changes    Path
[..]
>   1.162     +54 -3     src/sys/net/bpf.c
>   1.1       +85 -0     src/sys/net/bpf_jitter.c (new)
>   1.1       +80 -0     src/sys/net/bpf_jitter.h (new)
[..]

                BPFD_LOCK(d);
                if (wfilter)
                        d->bd_wfilter = fcode;
                else {
                        d->bd_rfilter = fcode;
#if BPF_JITTER
                        d->bd_bfilter = bpf_jitter(fcode, flen);
#endif

You are calling bpf_jitter() with a mutex held, and it looks like
bpf_jitter() will call malloc with M_WAITOK. Are you sure you want
to do this?


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


More information about the cvs-all mailing list