Bug 446060

Summary: kernel: sched_fair.c simplify sched_slice()
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: davej, lwang, security-response-team, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-22 16:36:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 447501    
Bug Blocks:    

Description Jan Lieskovsky 2008-05-12 14:12:46 UTC
Description of problem:

The problem is in sched_slice() called by sys_sched_rr_get_interval():
time_slice = NS_TO_JIFFIES(sched_slice(cfs_rq_of(se), se));
sched_slice() will use 'cfs_rq->load.weight' as the base for a
division, which is zero for process 1.

Version-Release number of selected component (if applicable):
Linux kernel 2.6.24 up to 2.6.25.2.

Additional info:

This issue not present on RHEL kernels (sched_slice first appeared
in 2.6.24). Filling only against the Fedora kernels.


The problem itself was fixed by Ingo with this commit (I think):
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
by using a different function on March 15. (2.6.25 rc phase sometime)

The code was changed back (and so broken again) to a version of the old version
6 weeks later by Peter in
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac884dec6d4a7df252150af875cffddf8f1d9c15
and fixed afterwards in:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8f1bc385cfbab474db6c27b5af1e439614f3025c
on a April 19 merge by Linus. (2.6.26 merge window)


Proposed upstream patch:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6a6029b8cefe0ca7e82f27f3904dbedba3de4e06

Comment 7 Vincent Danen 2010-12-22 16:36:52 UTC
This was addressed via:

MRG: http://rhn.redhat.com/errata/RHSA-2008-0585.html