Author: mjg
Date: Sun Nov 15 01:54:44 2020
New Revision: 367700
URL: https://svnweb.freebsd.org/changeset/base/367700

Log:
  sched: fix an incorrect comparison in sched_lend_user_prio_cond
  
  Compare with sched_lend_user_prio.

Modified:
  head/sys/kern/sched_4bsd.c
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_4bsd.c
==============================================================================
--- head/sys/kern/sched_4bsd.c  Sat Nov 14 20:45:12 2020        (r367699)
+++ head/sys/kern/sched_4bsd.c  Sun Nov 15 01:54:44 2020        (r367700)
@@ -952,7 +952,7 @@ sched_lend_user_prio_cond(struct thread *td, u_char pr
                goto lend;
        if (td->td_user_pri != min(prio, td->td_base_user_pri))
                goto lend;
-       if (td->td_priority >= td->td_user_pri)
+       if (td->td_priority != td->td_user_pri)
                goto lend;
        return;
 

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c   Sat Nov 14 20:45:12 2020        (r367699)
+++ head/sys/kern/sched_ule.c   Sun Nov 15 01:54:44 2020        (r367700)
@@ -1900,7 +1900,7 @@ sched_lend_user_prio_cond(struct thread *td, u_char pr
                goto lend;
        if (td->td_user_pri != min(prio, td->td_base_user_pri))
                goto lend;
-       if (td->td_priority >= td->td_user_pri)
+       if (td->td_priority != td->td_user_pri)
                goto lend;
        return;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to