All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, davej@redhat.com,
	srivatsa.bhat@linux.vnet.ibm.com, levinsasha928@gmail.com,
	tglx@linutronix.de, chuansheng.liu@intel.com
Subject: [tip:sched/urgent] sched: Fix incorrect usage of for_each_cpu_mask () in select_fallback_rq()
Date: Sat, 31 Mar 2012 02:46:54 -0700	[thread overview]
Message-ID: <tip-e3831edd59edf57ca11fc289f08961b20baf5146@git.kernel.org> (raw)
In-Reply-To: <4F75BED4.9050005@linux.vnet.ibm.com>

Commit-ID:  e3831edd59edf57ca11fc289f08961b20baf5146
Gitweb:     http://git.kernel.org/tip/e3831edd59edf57ca11fc289f08961b20baf5146
Author:     Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
AuthorDate: Fri, 30 Mar 2012 19:40:28 +0530
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 31 Mar 2012 10:43:36 +0200

sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()

The function for_each_cpu_mask() expects a *pointer* to struct
cpumask as its second argument, whereas select_fallback_rq()
passes the value itself.

And moreover, for_each_cpu_mask() has been marked as obselete
in include/linux/cpumask.h. So move to the more appropriate
for_each_cpu() variant.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Dave Jones <davej@redhat.com>
Cc: Liu Chuansheng <chuansheng.liu@intel.com>
Cc: vapier@gentoo.org
Cc: rusty@rustcorp.com.au
Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 985f6e5..8773176 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1268,7 +1268,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
 	int dest_cpu;
 
 	/* Look for allowed, online CPU in same node. */
-	for_each_cpu_mask(dest_cpu, *nodemask) {
+	for_each_cpu(dest_cpu, nodemask) {
 		if (!cpu_online(dest_cpu))
 			continue;
 		if (!cpu_active(dest_cpu))
@@ -1279,7 +1279,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
 
 	for (;;) {
 		/* Any allowed, online CPU? */
-		for_each_cpu_mask(dest_cpu, *tsk_cpus_allowed(p)) {
+		for_each_cpu(dest_cpu, tsk_cpus_allowed(p)) {
 			if (!cpu_online(dest_cpu))
 				continue;
 			if (!cpu_active(dest_cpu))

      parent reply	other threads:[~2012-03-31  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA+1xoqcf6qJOouKXGEHsjWSBJdA7qtMnuVopq+hoHS+TX8fvSg@mail.gmail.com>
2012-03-29 20:32 ` sched: WARNING: at include/linux/cpumask.h:108 select_fallback_rq+0x241/0x280() Sasha Levin
2012-03-30 14:10   ` Srivatsa S. Bhat
2012-03-30 14:45     ` Peter Zijlstra
2012-03-31  7:52       ` Srivatsa S. Bhat
2012-04-14  9:17         ` Peter Zijlstra
2012-04-14 11:40           ` Sasha Levin
2012-04-14 18:12             ` Peter Zijlstra
2012-04-14 18:37               ` Sasha Levin
2012-03-30 15:00     ` Sasha Levin
2012-03-31  9:46     ` tip-bot for Srivatsa S. Bhat [this message]

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=tip-e3831edd59edf57ca11fc289f08961b20baf5146@git.kernel.org \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=chuansheng.liu@intel.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.