diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-22 09:18:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-22 09:18:45 -0800 |
commit | b2214fca2bf7db492cd508769da7ca703a7f1806 (patch) | |
tree | ee7103a0d53f11213a8ea25aed37b50c2cab464b /kernel | |
parent | 00e10776ff908a767b3d36a53d330db8fdc53a56 (diff) | |
parent | c61935fd0e7f087a643827b4bf5ef646963c10fa (diff) | |
download | op-kernel-dev-b2214fca2bf7db492cd508769da7ca703a7f1806.zip op-kernel-dev-b2214fca2bf7db492cd508769da7ca703a7f1806.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
sched: group scheduler, set uid share fix
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 37cf07a..e76b11c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -7153,6 +7153,14 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) { int i; + /* + * A weight of 0 or 1 can cause arithmetics problems. + * (The default weight is 1024 - so there's no practical + * limitation from this.) + */ + if (shares < 2) + shares = 2; + spin_lock(&tg->lock); if (tg->shares == shares) goto done; |