Check if it is root user in do_unlock_pp.
This commit is contained in:
parent
647ef1a927
commit
295ce693b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161926
@ -1827,10 +1827,11 @@ do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags)
|
|||||||
struct umtx_pi *pi;
|
struct umtx_pi *pi;
|
||||||
uint32_t owner, id;
|
uint32_t owner, id;
|
||||||
uint32_t rceiling;
|
uint32_t rceiling;
|
||||||
int error, pri, new_inherited_pri;
|
int error, pri, new_inherited_pri, su;
|
||||||
|
|
||||||
id = td->td_tid;
|
id = td->td_tid;
|
||||||
uq = td->td_umtxq;
|
uq = td->td_umtxq;
|
||||||
|
su = (suser(td) == 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure we own this mtx.
|
* Make sure we own this mtx.
|
||||||
@ -1879,6 +1880,7 @@ do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags)
|
|||||||
error = EFAULT;
|
error = EFAULT;
|
||||||
else {
|
else {
|
||||||
mtx_lock_spin(&sched_lock);
|
mtx_lock_spin(&sched_lock);
|
||||||
|
if (su != 0)
|
||||||
uq->uq_inherited_pri = new_inherited_pri;
|
uq->uq_inherited_pri = new_inherited_pri;
|
||||||
pri = PRI_MAX;
|
pri = PRI_MAX;
|
||||||
TAILQ_FOREACH(pi, &uq->uq_pi_contested, pi_link) {
|
TAILQ_FOREACH(pi, &uq->uq_pi_contested, pi_link) {
|
||||||
|
Loading…
Reference in New Issue
Block a user