cvs commit: src/sys/net bpf.c bpfdesc.h
rwatson at FreeBSD.org
Mon Sep 13 19:59:22 PDT 2004
rwatson 2004-09-14 02:59:20 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_5)
sys/net bpf.c bpfdesc.h
Merge bpf.c:1.134-1.136, bpfdesc.h:1.28 to RELENG_5:
date: 2004/09/09 04:11:12; author: rwatson; state: Exp; lines: +20 -11
Reformulate bpf_dettachd() to acquire the BIF_LOCK() as well as
BPFD_LOCK() when removing a descriptor from an interface descriptor
list. Hold both over the operation, and do a better job at
maintaining the invariant that you can't find partially connected
descriptors on an active interface descriptor list.
This appears to close a race that resulted in the kernel performing
a NULL pointer dereference when BPF sessions are detached during
heavy network activity on SMP systems.
date: 2004/09/09 00:19:27; author: rwatson; state: Exp; lines: +20 -35
date: 2004/09/09 00:19:27; author: rwatson; state: Exp; lines: +4 -3
Reformulate use of linked lists in 'struct bpf_d' and 'struct bpf_if'
to use queue(3) list macros rather than hand-crafted lists. While
here, move to doubly linked lists to eliminate iterating lists in
order to remove entries. This change simplifies and clarifies the
list logic in the BPF descriptor code as a first step towards revising
the locking strategy.
Reviewed by: fenner
date: 2004/09/09 00:11:50; author: rwatson; state: Exp; lines: +3 -3
Compare/set pointers using NULL not 0.
Approved by: re (scottl)
Revision Changes Path
18.104.22.168 +41 -47 src/sys/net/bpf.c
22.214.171.124 +4 -3 src/sys/net/bpfdesc.h
More information about the cvs-all