From owner-cvs-src-old@FreeBSD.ORG Thu Jul 30 14:29:13 2009 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 01ACF106564A for ; Thu, 30 Jul 2009 14:29:13 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E35088FC15 for ; Thu, 30 Jul 2009 14:29:12 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6UETCn4067003 for ; Thu, 30 Jul 2009 14:29:12 GMT (envelope-from jamie@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6UETCOG067002 for cvs-src-old@freebsd.org; Thu, 30 Jul 2009 14:29:12 GMT (envelope-from jamie@repoman.freebsd.org) Message-Id: <200907301429.n6UETCOG067002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jamie@repoman.freebsd.org using -f From: Jamie Gritton Date: Thu, 30 Jul 2009 14:28:56 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_jail.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: Thu, 30 Jul 2009 14:29:13 -0000 jamie 2009-07-30 14:28:56 UTC FreeBSD src repository Modified files: sys/kern kern_jail.c Log: SVN rev 195974 on 2009-07-30 14:28:56Z by jamie Remove a LOR, where the the sleepable allprison_lock was being obtained in prison_equal_ip4/6 while an inp mutex was held. Locking allprison_lock can be avoided by making a restriction on the IP addresses associated with jails: Don't allow the "ip4" and "ip6" parameters to be changed after a jail is created. Setting the "ip4.addr" and "ip6.addr" parameters is allowed, but only if the jail was already created with either ip4/6=new or ip4/6=disable. With this restriction, the prison flags in question (PR_IP4_USER and PR_IP6_USER) become read-only and can be checked without locking. This also allows the simplification of a messy code path that was needed to handle an existing prison gaining an IP address list. PR: kern/136899 Reported by: Dirk Meyer Approved by: re (kib), bz (mentor) Revision Changes Path 1.116 +187 -309 src/sys/kern/kern_jail.c