提交 bb8416bf 编写于 作者: S Siddha, Suresh B 提交者: Tony Luck

[IA64] save and restore cpus_allowed in cpu_idle_wait

Save and Restore the task's cpus_allowed mask, across the set_cpus_allowed()
in cpu_idle_wait(). Without this, we will endup corrupting task's cpu affinity.
Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 9d1d4cc8
...@@ -237,6 +237,7 @@ void cpu_idle_wait(void) ...@@ -237,6 +237,7 @@ void cpu_idle_wait(void)
{ {
unsigned int cpu, this_cpu = get_cpu(); unsigned int cpu, this_cpu = get_cpu();
cpumask_t map; cpumask_t map;
cpumask_t tmp = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(this_cpu)); set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
put_cpu(); put_cpu();
...@@ -258,6 +259,7 @@ void cpu_idle_wait(void) ...@@ -258,6 +259,7 @@ void cpu_idle_wait(void)
} }
cpus_and(map, map, cpu_online_map); cpus_and(map, map, cpu_online_map);
} while (!cpus_empty(map)); } while (!cpus_empty(map));
set_cpus_allowed(current, tmp);
} }
EXPORT_SYMBOL_GPL(cpu_idle_wait); EXPORT_SYMBOL_GPL(cpu_idle_wait);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册