From owner-cvs-all@FreeBSD.ORG Tue Sep 14 02:59:21 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDAF816A4D1; Tue, 14 Sep 2004 02:59:21 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A18143D45; Tue, 14 Sep 2004 02:59:21 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8E2xKj5098987; Tue, 14 Sep 2004 02:59:20 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8E2xKeA098986; Tue, 14 Sep 2004 02:59:20 GMT (envelope-from rwatson) Message-Id: <200409140259.i8E2xKeA098986@repoman.freebsd.org> From: Robert Watson Date: Tue, 14 Sep 2004 02:59:20 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/net bpf.c bpfdesc.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 02:59:22 -0000 rwatson 2004-09-14 02:59:20 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/net bpf.c bpfdesc.h Log: 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) Revision Changes Path 1.133.2.1 +41 -47 src/sys/net/bpf.c 1.27.2.1 +4 -3 src/sys/net/bpfdesc.h