K 10 svn:author V 7 rwatson K 8 svn:date V 27 2004-09-14T02:59:20.000000Z K 7 svn:log V 1369 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. RELENG_5 candidate. 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. RELENG_5 candidate. 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) END