diff options
author | Thomas Gleixner <[email protected]> | 2017-04-12 22:07:31 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-04-15 12:20:54 +0200 |
commit | 6d11b87d55eb75007a3721c2de5938f5bbf607fb (patch) | |
tree | ca27c670a324dcb47a6b0dbdaf9ced60b53db02f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9feb42ac88b516e378b9782e82b651ca5bed95c4 (diff) |
powerpc/smp: Replace open coded task affinity logic
Init task invokes smp_ops->setup_cpu() from smp_cpus_done(). Init task can
run on any online CPU at this point, but the setup_cpu() callback requires
to be invoked on the boot CPU. This is achieved by temporarily setting the
affinity of the calling user space thread to the requested CPU and reset it
to the original affinity afterwards.
That's racy vs. CPU hotplug and concurrent affinity settings for that
thread resulting in code executing on the wrong CPU and overwriting the
new affinity setting.
That's actually not a problem in this context as neither CPU hotplug nor
affinity settings can happen, but the access to task_struct::cpus_allowed
is about to restricted.
Replace it with a call to work_on_cpu_safe() which achieves the same result.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Michael Ellerman <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Sebastian Siewior <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: [email protected]
Cc: "David S. Miller" <[email protected]>
Cc: Len Brown <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions