aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2018-09-06 15:21:38 +0200
committerThomas Gleixner <[email protected]>2018-09-06 15:21:38 +0200
commit69fa6eb7d6a64801ea261025cce9723d9442d773 (patch)
tree6e6c0c8a1368d6e6e3ca5cf051161bad6450e094 /tools/perf/util/trace-event-scripting.c
parentf8b7530aa0a1def79c93101216b5b17cf408a70a (diff)
cpu/hotplug: Prevent state corruption on error rollback
When a teardown callback fails, the CPU hotplug code brings the CPU back to the previous state. The previous state becomes the new target state. The rollback happens in undo_cpu_down() which increments the state unconditionally even if the state is already the same as the target. As a consequence the next CPU hotplug operation will start at the wrong state. This is easily to observe when __cpu_disable() fails. Prevent the unconditional undo by checking the state vs. target before incrementing state and fix up the consequently wrong conditional in the unplug code which handles the failure of the final CPU take down on the control CPU side. Fixes: 4dddfb5faa61 ("smp/hotplug: Rewrite AP state machine core") Reported-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Tested-by: Sudeep Holla <[email protected]> Tested-by: Neeraj Upadhyay <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] ----
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions