svn commit: r349994 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Jul 15 08:38:01 UTC 2019
Author: kib
Date: Mon Jul 15 08:38:01 2019
New Revision: 349994
URL: https://svnweb.freebsd.org/changeset/base/349994
Log:
Correctly check for casueword(9) success in do_set_ceiling().
After r349951, the return code must be checked instead of old == new
comparision.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 12 days
Differential revision: https://reviews.freebsd.org/D20949
Modified:
head/sys/kern/kern_umtx.c
Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c Mon Jul 15 08:21:49 2019 (r349993)
+++ head/sys/kern/kern_umtx.c Mon Jul 15 08:38:01 2019 (r349994)
@@ -2456,7 +2456,8 @@ do_set_ceiling(struct thread *td, struct umutex *m, ui
break;
}
- if (owner == UMUTEX_CONTESTED) {
+ if (rv == 0) {
+ MPASS(owner == UMUTEX_CONTESTED);
rv = suword32(&m->m_ceilings[0], ceiling);
rv1 = suword32(&m->m_owner, UMUTEX_CONTESTED);
error = (rv == 0 && rv1 == 0) ? 0: EFAULT;
More information about the svn-src-all
mailing list