diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-12-20 14:58:00 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-06-06 21:28:25 -0400 |
commit | 92149ae2a3e2fb2250a6e4dbf73f92f159125072 (patch) | |
tree | c4c940258f58a0e913bfc8485bf2af94de574aa5 | |
parent | d817390c5b35d303f9718945d08863d3e847bd95 (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 3b270e7182aa..0d473199ac31 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4591,10 +4591,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; } |