CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2015/10/07 02:41:01

Modified files:
        sys/net        : bpf.c 

Log message:
Do not call bpf_catchpacket() if another CPU detached a file from the
corresponding interface.

bfp_tap() and _bpf_mtap() are mostly run without the KERNEL_LOCK.  The
use of SRPs in these functions gives us the guarantees that manipulated
BPF descriptors are alive but not the associated interface desctiptor!
And indeed they can be cleared by another CPU running bpf_detachd().

Prevent a race reported by Hrvoje Popovski when closing tcpdump(8) with
an IPL_MPSAFE ix(4).

ok mikeb@, dlg@, deraadt@

Reply via email to