PERFORCE change 44103 for review
Sam Leffler
sam at FreeBSD.org
Fri Dec 19 11:36:27 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=44103
Change 44103 by sam at 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);
}
More information about the p4-projects
mailing list