From owner-cvs-src@FreeBSD.ORG Sun Apr 20 00:21:55 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E1DA1065671; Sun, 20 Apr 2008 00:21:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 826BA8FC0A; Sun, 20 Apr 2008 00:21:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3K0Lt6N050662; Sun, 20 Apr 2008 00:21:55 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3K0Lti7050661; Sun, 20 Apr 2008 00:21:55 GMT (envelope-from rwatson) Message-Id: <200804200021.m3K0Lti7050661@repoman.freebsd.org> From: Robert Watson Date: Sun, 20 Apr 2008 00:21:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/contrib/pf/net pf.c src/sys/netinet ip_fw2.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2008 00:21:55 -0000 rwatson 2008-04-20 00:21:54 UTC FreeBSD src repository Modified files: sys/contrib/pf/net pf.c sys/netinet ip_fw2.c Log: Teach pf and ipfw to use read locks in inpcbs write than write locks when reading credential data from sockets. Teach pf to unlock the pcbinfo more quickly once it has acquired an inpcb lock, as the inpcb lock is sufficient to protect the reference. Assert locks, rather than read locks or write locks, on inpcbs in subroutines--this is necessary as the inpcb may be passed down with a write lock from the protocol, or may be passed down with a read lock from the firewall lookup routine, and either is sufficient. MFC after: 3 months Revision Changes Path 1.53 +5 -6 src/sys/contrib/pf/net/pf.c 1.185 +3 -3 src/sys/netinet/ip_fw2.c