[Bug 217022] [PATCH] To be using an uninitialized variable member of struct cpu_search at function cpu_search

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 12 11:03:13 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217022

            Bug ID: 217022
           Summary: [PATCH] To be using an uninitialized variable member
                    of struct cpu_search at function cpu_search
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: hisamitu at uranus.dti.ne.jp
          Keywords: patch

Created attachment 179896
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179896&action=edit
[PATCH] To be using an uninitialized variable member of struct cpu_search at
function cpu_search

I have found that an uninitialized member variable of struct cpu_search is used
in function cpu_search of sys/kern/sched_ule.c.

A value of cs_load seems to be decided on a process of function cpu_search,
whereas other member variables of struct cpu_search that uses in function
cpu_search are initialized at both function sched_lowest and function
sched_highest.

However, when a member variable cs_load from an arguments(log and high) is
compared with one from auto variable(lgroup and hgroup), I thought that a
member variable cs_load from an arguments(low and high) is uninitialized.

I have thought that it is a bug, so I have made a patch for fixing it.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list