Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2003 11:36:23 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 44103 for review
Message-ID:  <200312191936.hBJJaNV5091106@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312191936.hBJJaNV5091106>