diff options
author | ups <ups@FreeBSD.org> | 2005-05-19 01:08:30 +0000 |
---|---|---|
committer | ups <ups@FreeBSD.org> | 2005-05-19 01:08:30 +0000 |
commit | c8d93020ce6f440b51aaa0daedb71f965a3703c1 (patch) | |
tree | cc6ba15cb4b6aad885a39370e96fb8590915e0c8 /sys | |
parent | 050a3f3809cde7809c26de3701de449faec287cb (diff) | |
download | FreeBSD-src-c8d93020ce6f440b51aaa0daedb71f965a3703c1.zip FreeBSD-src-c8d93020ce6f440b51aaa0daedb71f965a3703c1.tar.gz |
Fix a bug that caused preemption to happen for a thread in the same
ksegrp with the same priority as the currently running thread.
This can cause propagate_priority() to panic.
Pointy hat to: ups
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 421cc31..530305c 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -353,7 +353,7 @@ maybe_preempt_in_ksegrp(struct thread *td) if (running_thread->td_ksegrp != td->td_ksegrp) return; - if (td->td_priority > running_thread->td_priority) + if (td->td_priority >= running_thread->td_priority) return; #ifdef PREEMPTION if (running_thread->td_critnest > 1) @@ -442,7 +442,7 @@ maybe_preempt_in_ksegrp(struct thread *td) } #endif - if (td->td_priority > running_thread->td_priority) + if (td->td_priority >= running_thread->td_priority) return; #ifdef PREEMPTION if (running_thread->td_critnest > 1) |