aboutsummaryrefslogtreecommitdiff
path: root/sys/security/mac_lomac/mac_lomac.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/security/mac_lomac/mac_lomac.c')
-rw-r--r--sys/security/mac_lomac/mac_lomac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c
index ae575317501f..8d9b13e0a979 100644
--- a/sys/security/mac_lomac/mac_lomac.c
+++ b/sys/security/mac_lomac/mac_lomac.c
@@ -536,10 +536,10 @@ maybe_demote(struct mac_lomac *subjlabel, struct mac_lomac *objlabel,
subj->mac_lomac.ml_rangelow = objlabel->ml_single;
subj->mac_lomac.ml_rangehigh = objlabel->ml_single;
subj->mac_lomac.ml_flags |= MAC_LOMAC_FLAG_UPDATE;
- mtx_lock_spin(&sched_lock);
+ thread_lock(curthread);
curthread->td_flags |= TDF_ASTPENDING;
curthread->td_proc->p_sflag |= PS_MACPEND;
- mtx_unlock_spin(&sched_lock);
+ thread_unlock(curthread);
/*
* Avoid memory allocation while holding a mutex; cache the