diff options
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index b048ad8a11af..94ead43eda62 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
| @@ -4398,22 +4398,20 @@ do_wait_for_common(struct completion *x, long timeout, int state) | |||
| 4398 | signal_pending(current)) || | 4398 | signal_pending(current)) || |
| 4399 | (state == TASK_KILLABLE && | 4399 | (state == TASK_KILLABLE && |
| 4400 | fatal_signal_pending(current))) { | 4400 | fatal_signal_pending(current))) { |
| 4401 | __remove_wait_queue(&x->wait, &wait); | 4401 | timeout = -ERESTARTSYS; |
| 4402 | return -ERESTARTSYS; | 4402 | break; |
| 4403 | } | 4403 | } |
| 4404 | __set_current_state(state); | 4404 | __set_current_state(state); |
| 4405 | spin_unlock_irq(&x->wait.lock); | 4405 | spin_unlock_irq(&x->wait.lock); |
| 4406 | timeout = schedule_timeout(timeout); | 4406 | timeout = schedule_timeout(timeout); |
| 4407 | spin_lock_irq(&x->wait.lock); | 4407 | spin_lock_irq(&x->wait.lock); |
| 4408 | if (!timeout) { | 4408 | } while (!x->done && timeout); |
| 4409 | __remove_wait_queue(&x->wait, &wait); | ||
| 4410 | return timeout; | ||
| 4411 | } | ||
| 4412 | } while (!x->done); | ||
| 4413 | __remove_wait_queue(&x->wait, &wait); | 4409 | __remove_wait_queue(&x->wait, &wait); |
| 4410 | if (!x->done) | ||
| 4411 | return timeout; | ||
| 4414 | } | 4412 | } |
| 4415 | x->done--; | 4413 | x->done--; |
| 4416 | return timeout; | 4414 | return timeout ?: 1; |
| 4417 | } | 4415 | } |
| 4418 | 4416 | ||
| 4419 | static long __sched | 4417 | static long __sched |
| @@ -5889,6 +5887,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu) | |||
| 5889 | next = pick_next_task(rq, rq->curr); | 5887 | next = pick_next_task(rq, rq->curr); |
| 5890 | if (!next) | 5888 | if (!next) |
| 5891 | break; | 5889 | break; |
| 5890 | next->sched_class->put_prev_task(rq, next); | ||
| 5892 | migrate_dead(dead_cpu, next); | 5891 | migrate_dead(dead_cpu, next); |
| 5893 | 5892 | ||
| 5894 | } | 5893 | } |
| @@ -8503,6 +8502,9 @@ int sched_group_set_rt_period(struct task_group *tg, long rt_period_us) | |||
| 8503 | rt_period = (u64)rt_period_us * NSEC_PER_USEC; | 8502 | rt_period = (u64)rt_period_us * NSEC_PER_USEC; |
| 8504 | rt_runtime = tg->rt_bandwidth.rt_runtime; | 8503 | rt_runtime = tg->rt_bandwidth.rt_runtime; |
| 8505 | 8504 | ||
| 8505 | if (rt_period == 0) | ||
| 8506 | return -EINVAL; | ||
| 8507 | |||
| 8506 | return tg_set_bandwidth(tg, rt_period, rt_runtime); | 8508 | return tg_set_bandwidth(tg, rt_period, rt_runtime); |
| 8507 | } | 8509 | } |
| 8508 | 8510 | ||
