mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
Fix reverse ordering of locks. add a comment about locks on some platforms.
Submitted by: jhb@freebsd.org
This commit is contained in:
parent
5cdd3a031f
commit
8540497c50
5 changed files with 5 additions and 5 deletions
|
|
@ -301,8 +301,8 @@ trap(a0, a1, a2, entry, framep)
|
|||
if (td->td_ucred != p->p_ucred)
|
||||
cred_update_thread(td);
|
||||
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
|
||||
mtx_lock_spin(&sched_lock);
|
||||
PROC_LOCK(p);
|
||||
mtx_lock_spin(&sched_lock);
|
||||
thread_exit();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ trap(frame)
|
|||
* But check if we are the single thread first!
|
||||
*/
|
||||
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
|
||||
PROC_LOCK(p); /* check if thisis really needed */
|
||||
mtx_lock_spin(&sched_lock);
|
||||
PROC_LOCK(p);
|
||||
thread_exit();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ trap(frame)
|
|||
* But check if we are the single thread first!
|
||||
*/
|
||||
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
|
||||
PROC_LOCK(p); /* check if thisis really needed */
|
||||
mtx_lock_spin(&sched_lock);
|
||||
PROC_LOCK(p);
|
||||
thread_exit();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ trap(int vector, int imm, struct trapframe *framep)
|
|||
cred_update_thread(td);
|
||||
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
|
||||
mtx_lock_spin(&sched_lock);
|
||||
thread_exit();
|
||||
thread_exit(); /* XXXKSE need proc lock? */
|
||||
/* NOTREACHED */
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ trap(struct trapframe *tf)
|
|||
cred_update_thread(td);
|
||||
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
|
||||
mtx_lock_spin(&sched_lock);
|
||||
thread_exit();
|
||||
thread_exit(); /* XXXKSE need proc lock? */
|
||||
/* NOTREACHED */
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue