Author: gallatin
Date: Mon Mar 18 12:41:42 2019
New Revision: 345273
URL: https://svnweb.freebsd.org/changeset/base/345273

Log:
  Fix a typo introduced in r344133
  
  The line was misedited to change tt to st instead of
  changing ut to st.
  
  The use of st as the denominator in mul64_by_fraction() will lead
  to an integer divide fault in the intr proc (the process holding
  ithreads) where st will be 0.  This divide by 0 happens after
  the total runtime for all ithreads exceeds 76 hours.
  
  Submitted by: bde

Modified:
  head/sys/kern/kern_resource.c

Modified: head/sys/kern/kern_resource.c
==============================================================================
--- head/sys/kern/kern_resource.c       Mon Mar 18 12:34:13 2019        
(r345272)
+++ head/sys/kern/kern_resource.c       Mon Mar 18 12:41:42 2019        
(r345273)
@@ -978,7 +978,7 @@ calcru1(struct proc *p, struct rusage_ext *ruxp, struc
                su = (tu * st) / tt;
        } else {
                uu = mul64_by_fraction(tu, ut, tt);
-               su = mul64_by_fraction(tu, ut, st);
+               su = mul64_by_fraction(tu, st, tt);
        }
 
        if (tu >= ruxp->rux_tu) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to