From owner-cvs-src-old@FreeBSD.ORG Sat Jun 4 16:26:25 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668F21065745 for ; Sat, 4 Jun 2011 16:26:25 +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 55D7F8FC1B for ; Sat, 4 Jun 2011 16:26:25 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p54GQPVF057856 for ; Sat, 4 Jun 2011 16:26:25 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p54GQPTc057855 for cvs-src-old@freebsd.org; Sat, 4 Jun 2011 16:26:25 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <201106041626.p54GQPTc057855@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Sat, 4 Jun 2011 16:26:02 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netinet ip_divert.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2011 16:26:25 -0000 rwatson 2011-06-04 16:26:02 UTC FreeBSD src repository Modified files: sys/netinet ip_divert.c Log: SVN rev 222690 on 2011-06-04 16:26:02Z by rwatson IP divert sockets use their inpcbinfo for port reservation, although not for lookup. I missed its call to in_pcbbind() when preparing previous patches, which would lead to a lock assertion failure (although problem not an actual race condition due to global pcbinfo locks providing required synchronisation -- in this particular case only). This change adds the missing locking of the pcbhash lock. (Existing comments in the ipdivert code question the need for using the global hash to manage the namespace, as really it's a simple port namespace and not an address/port namespace. Also, although in_pcbbind is used to manage reservations, the hash tables aren't used for lookup. It might be a good idea to make them use hashed lookup, or to use a different reservation scheme.) Reviewed by: bz Reported by: Kristof Provost Sponsored by: Juniper Networks Revision Changes Path 1.170 +2 -0 src/sys/netinet/ip_divert.c