aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3df84ea6aba9..e76b11ca6df3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4918,7 +4918,7 @@ static void show_task(struct task_struct *p)
4918 } 4918 }
4919#endif 4919#endif
4920 printk(KERN_CONT "%5lu %5d %6d\n", free, 4920 printk(KERN_CONT "%5lu %5d %6d\n", free,
4921 task_pid_nr(p), task_pid_nr(p->parent)); 4921 task_pid_nr(p), task_pid_nr(p->real_parent));
4922 4922
4923 if (state != TASK_RUNNING) 4923 if (state != TASK_RUNNING)
4924 show_stack(p, NULL); 4924 show_stack(p, NULL);
@@ -7153,6 +7153,14 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
7153{ 7153{
7154 int i; 7154 int i;
7155 7155
7156 /*
7157 * A weight of 0 or 1 can cause arithmetics problems.
7158 * (The default weight is 1024 - so there's no practical
7159 * limitation from this.)
7160 */
7161 if (shares < 2)
7162 shares = 2;
7163
7156 spin_lock(&tg->lock); 7164 spin_lock(&tg->lock);
7157 if (tg->shares == shares) 7165 if (tg->shares == shares)
7158 goto done; 7166 goto done;