[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e3831edd59edf57ca11fc289f08961b20baf5146@git.kernel.org>
Date: Sat, 31 Mar 2012 02:46:54 -0700
From: "tip-bot for Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
a.p.zijlstra@...llo.nl, davej@...hat.com,
srivatsa.bhat@...ux.vnet.ibm.com, levinsasha928@...il.com,
tglx@...utronix.de, chuansheng.liu@...el.com
Subject: [tip:sched/urgent] sched: Fix incorrect usage of for_each_cpu_mask
() in select_fallback_rq()
Commit-ID: e3831edd59edf57ca11fc289f08961b20baf5146
Gitweb: http://git.kernel.org/tip/e3831edd59edf57ca11fc289f08961b20baf5146
Author: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
AuthorDate: Fri, 30 Mar 2012 19:40:28 +0530
Committer: Ingo Molnar <mingo@...nel.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@...il.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Dave Jones <davej@...hat.com>
Cc: Liu Chuansheng <chuansheng.liu@...el.com>
Cc: vapier@...too.org
Cc: rusty@...tcorp.com.au
Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@...nel.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))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists