diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-12-20 14:58:00 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-08-13 16:09:03 -0400 |
commit | 104dd502dff2e7278906869a5a7a8cb604831632 (patch) | |
tree | f3a4c2bccf4c86e2670703bf2e18628fcf74a9fc | |
parent | b73e402486f9b6412db1abb2cae0023d2376496f (diff) |
sched: Adjust sched_reset_on_fork when nothing else changes
If the policy and priority remain unchanged a possible modification of
sched_reset_on_fork gets lost in the early exit path.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Cc: stable-rt@vger.kernel.org
-rw-r--r-- | kernel/sched/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f4c7de980c10..b20c88bc41fc 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4121,10 +4121,13 @@ recheck: } /* - * If not changing anything there's no need to proceed further: + * If not changing anything there's no need to proceed + * further, but store a possible modification of + * reset_on_fork. */ if (unlikely(policy == p->policy && (!rt_policy(policy) || param->sched_priority == p->rt_priority))) { + p->sched_reset_on_fork = reset_on_fork; task_rq_unlock(rq, p, &flags); return 0; } |