PERFORCE change 45585 for review
Scott Long
scottl at FreeBSD.org
Mon Jan 19 00:07:09 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=45585
Change 45585 by scottl at 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);
}
More information about the p4-projects
mailing list