Commit b2214fca authored by Linus Torvalds's avatar Linus Torvalds
parents 00e10776 c61935fd
...@@ -7153,6 +7153,14 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) ...@@ -7153,6 +7153,14 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
{ {
int i; 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); spin_lock(&tg->lock);
if (tg->shares == shares) if (tg->shares == shares)
goto done; goto done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment