Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2004 00:07:07 -0800 (PST)
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 45585 for review
Message-ID:  <200401190807.i0J877mJ036520@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=45585

Change 45585 by scottl@scottl_netperf_socket on 2004/01/19 00:07:01

	Push down Giant to avoid LORs with the cred code.

Affected files ...

.. //depot/projects/netperf_socket/sys/kern/kern_jail.c#2 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_prot.c#2 integrate

Differences ...

==== //depot/projects/netperf_socket/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_socket/sys/kern/kern_prot.c#2 (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?200401190807.i0J877mJ036520>