mirror of
https://github.com/opnsense/src.git
synced 2026-02-27 03:40:37 -05:00
Fix a recursion on the thread lock by acquiring it after call rtp_to_pri().
Reported by: swills Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23495
This commit is contained in:
parent
dc3915c8c6
commit
c8ea36e881
1 changed files with 5 additions and 7 deletions
|
|
@ -271,14 +271,12 @@ thread_create(struct thread *td, struct rtprio *rtp,
|
|||
|
||||
tidhash_add(newtd);
|
||||
|
||||
/* ignore timesharing class */
|
||||
if (rtp != NULL && !(td->td_pri_class == PRI_TIMESHARE &&
|
||||
rtp->type == RTP_PRIO_NORMAL))
|
||||
rtp_to_pri(rtp, newtd);
|
||||
|
||||
thread_lock(newtd);
|
||||
if (rtp != NULL) {
|
||||
if (!(td->td_pri_class == PRI_TIMESHARE &&
|
||||
rtp->type == RTP_PRIO_NORMAL)) {
|
||||
rtp_to_pri(rtp, newtd);
|
||||
sched_prio(newtd, newtd->td_user_pri);
|
||||
} /* ignore timesharing class */
|
||||
}
|
||||
TD_SET_CAN_RUN(newtd);
|
||||
sched_add(newtd, SRQ_BORING);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue