stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
	<stable@vger.kernel.org>, <stable-rt@vger.kernel.org>
Subject: [PATCH RT 1/4] sched: Adjust sched_reset_on_fork when nothing else changes
Date: Sat, 22 Dec 2012 10:49:23 -0500	[thread overview]
Message-ID: <20121222154947.071059966@goodmis.org> (raw)
In-Reply-To: 20121222154922.724242376@goodmis.org

[-- Attachment #1: 0001-sched-Adjust-sched_reset_on_fork-when-nothing-else-c.patch --]
[-- Type: text/plain, Size: 983 bytes --]

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



       reply	other threads:[~2012-12-22 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121222154922.724242376@goodmis.org>
2012-12-22 15:49 ` Steven Rostedt [this message]
2012-12-22 15:49 ` [PATCH RT 2/4] sched: Queue RT tasks to head when prio drops Steven Rostedt
2012-12-22 15:49 ` [PATCH RT 3/4] sched: Consider pi boosting in setscheduler Steven Rostedt
     [not found] <20121222171201.588460638@goodmis.org>
2012-12-22 17:12 ` [PATCH RT 1/4] sched: Adjust sched_reset_on_fork when nothing else changes Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121222154947.071059966@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=C.Emde@osadl.org \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=stable-rt@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).