lkml.org 
[lkml]   [2012]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH RT 1/4] sched: Adjust sched_reset_on_fork when nothing else changes
From: Thomas Gleixner <tglx@linutronix.de>

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
---
kernel/sched.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index cdf9484..9af4bbe 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5719,11 +5719,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;
--
1.7.10.4



\
 
 \ /
  Last update: 2012-12-22 17:41    [W:0.038 / U:24.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site