Skip to content

Commit bb8416b

Browse files
Siddha, Suresh Baegl
authored andcommitted
[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: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
1 parent 9d1d4cc commit bb8416b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/ia64/kernel/process.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void cpu_idle_wait(void)
237237
{
238238
unsigned int cpu, this_cpu = get_cpu();
239239
cpumask_t map;
240+
cpumask_t tmp = current->cpus_allowed;
240241

241242
set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
242243
put_cpu();
@@ -258,6 +259,7 @@ void cpu_idle_wait(void)
258259
}
259260
cpus_and(map, map, cpu_online_map);
260261
} while (!cpus_empty(map));
262+
set_cpus_allowed(current, tmp);
261263
}
262264
EXPORT_SYMBOL_GPL(cpu_idle_wait);
263265

0 commit comments

Comments
 (0)