Date: Wed, 4 Oct 2006 14:30:02 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107251 for review Message-ID: <200610041430.k94EU2lA050840@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107251 Change 107251 by rwatson@rwatson_zoo on 2006/10/04 14:29:54 Catch up with new super-user checks: there's a rather nasty race in umtx priority propagation in the event we allow privileges to be revoked, and I have e-mailed davidxu about ensuring that restore of priority is done unconditionally. Affected files ... .. //depot/projects/trustedbsd/priv/sys/kern/kern_umtx.c#4 edit Differences ... ==== //depot/projects/trustedbsd/priv/sys/kern/kern_umtx.c#4 (text+ko) ==== @@ -34,6 +34,7 @@ #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> +#include <sys/priv.h> #include <sys/proc.h> #include <sys/sched.h> #include <sys/sysctl.h> @@ -1607,7 +1608,7 @@ if ((error = umtx_key_get(m, TYPE_PP_UMUTEX, GET_SHARE(flags), &uq->uq_key)) != 0) return (error); - su = (suser(td) == 0); + su = (priv_check(td, PRIV_SCHED_RTPRIO) == 0); for (;;) { old_inherited_pri = uq->uq_inherited_pri; umtxq_lock(&uq->uq_key); @@ -1728,7 +1729,7 @@ id = td->td_tid; uq = td->td_umtxq; - su = (suser(td) == 0); + su = (priv_check(td, PRIV_SCHED_RTPRIO) == 0); /* * Make sure we own this mtx.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610041430.k94EU2lA050840>