summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-12-20 14:58:00 +0100
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2014-02-26 21:21:20 -0500
commit68507ed46ac08ba8a8ee6a0f72dd077863fcfeab (patch)
treec96c3d5ed10d0b1cccb6cd4955660580b67da4c0
parentff31e9fac702ec06f3ebc0f83adf0f9d8e7ba6b1 (diff)
downloadlinux-rt-68507ed46ac08ba8a8ee6a0f72dd077863fcfeab.tar.gz
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 53beeb0d5b60..eeb09d674fa6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4500,11 +4500,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);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
return 0;