[tip:sched/core] sched: Remove extra put_online_cpus() inside sched_setaffinity()

From: tip-bot for Michael wang
Date: Mon Oct 28 2013 - 09:34:35 EST


Commit-ID: ac9ff7997b6f2b31949dcd2495ac671fd9ddc990
Gitweb: http://git.kernel.org/tip/ac9ff7997b6f2b31949dcd2495ac671fd9ddc990
Author: Michael wang <wangyun@xxxxxxxxxxxxxxxxxx>
AuthorDate: Mon, 28 Oct 2013 10:50:22 +0800
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Mon, 28 Oct 2013 11:36:50 +0100

sched: Remove extra put_online_cpus() inside sched_setaffinity()

Commit 6acce3ef8:

sched: Remove get_online_cpus() usage

has left one extra put_online_cpus() inside sched_setaffinity(),
remove it to fix the WARN:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 3166 at kernel/cpu.c:84 put_online_cpus+0x43/0x70()
...
[<ffffffff810c3fef>] put_online_cpus+0x43/0x70 [
[<ffffffff810efd59>] sched_setaffinity+0x7d/0x1f9 [
...

Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Tested-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Michael Wang <wangyun@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/526DD0EE.1090309@xxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c06b8d3..7c61f31 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
- put_online_cpus();
return -ESRCH;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/