Skip to content

Commit ac9ff79

Browse files
Michael wangIngo Molnar
authored andcommitted
sched: Remove extra put_online_cpus() inside sched_setaffinity()
Commit 6acce3e: 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 <[email protected]> Tested-by: Fengguang Wu <[email protected]> Signed-off-by: Michael Wang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent e9aa39b commit ac9ff79

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/sched/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
37163716
p = find_process_by_pid(pid);
37173717
if (!p) {
37183718
rcu_read_unlock();
3719-
put_online_cpus();
37203719
return -ESRCH;
37213720
}
37223721

0 commit comments

Comments
 (0)