From owner-p4-projects@FreeBSD.ORG Fri Dec 19 11:36:27 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0CCC316A4D0; Fri, 19 Dec 2003 11:36:27 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D58BE16A4CE for ; Fri, 19 Dec 2003 11:36:26 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07F0F43D36 for ; Fri, 19 Dec 2003 11:36:24 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id hBJJaN0B091109 for ; Fri, 19 Dec 2003 11:36:23 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id hBJJaNV5091106 for perforce@freebsd.org; Fri, 19 Dec 2003 11:36:23 -0800 (PST) (envelope-from sam@freebsd.org) Date: Fri, 19 Dec 2003 11:36:23 -0800 (PST) Message-Id: <200312191936.hBJJaNV5091106@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 44103 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 19:36:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=44103 Change 44103 by sam@sam_ebb on 2003/12/19 11:35:28 partially eliminate LOR between tcpcb and Giant by pushing Giant into prison_free; this doesn't fix the case where unix domain sockets are used in jails but does fix the normal case Affected files ... .. //depot/projects/netperf+sockets/sys/kern/kern_jail.c#2 edit .. //depot/projects/netperf+sockets/sys/kern/kern_prot.c#3 edit Differences ... ==== //depot/projects/netperf+sockets/sys/kern/kern_jail.c#2 (text+ko) ==== @@ -255,7 +255,7 @@ prison_free(struct prison *pr) { - mtx_assert(&Giant, MA_OWNED); + mtx_lock(&Giant); mtx_lock(&allprison_mtx); mtx_lock(&pr->pr_mtx); pr->pr_ref--; @@ -273,6 +273,7 @@ } mtx_unlock(&pr->pr_mtx); mtx_unlock(&allprison_mtx); + mtx_unlock(&Giant); } void ==== //depot/projects/netperf+sockets/sys/kern/kern_prot.c#3 (text+ko) ==== @@ -1752,7 +1752,6 @@ * allocate a uidinfo structure. */ mtx_unlock(mtxp); - mtx_lock(&Giant); if (cr->cr_uidinfo != NULL) uifree(cr->cr_uidinfo); if (cr->cr_ruidinfo != NULL) @@ -1766,7 +1765,6 @@ mac_destroy_cred(cr); #endif FREE(cr, M_CRED); - mtx_unlock(&Giant); } else { mtx_unlock(mtxp); }