aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-22 06:54:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-22 06:54:42 -0400
commit5670a8471e27ff400e9446b5bab6c296c8d8a733 (patch)
tree55b301c311e31bf7c89e2c83ed7f2e060a05e746 /kernel
parentMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentcpu/hotplug: Reset node state after operation (diff)
downloadlinux-dev-5670a8471e27ff400e9446b5bab6c296c8d8a733.tar.xz
linux-dev-5670a8471e27ff400e9446b5bab6c296c8d8a733.zip
Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp/hotplug fix from Thomas Gleixner: "The recent rework of the callback invocation missed to cleanup the leftovers of the operation, so under certain circumstances a subsequent CPU hotplug operation accesses stale data and crashes. Clean it up." * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Reset node state after operation
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index d851df22f5c5..04892a82f6ac 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -632,6 +632,11 @@ cpuhp_invoke_ap_callback(int cpu, enum cpuhp_state state, bool bringup,
__cpuhp_kick_ap(st);
}
+ /*
+ * Clean up the leftovers so the next hotplug operation wont use stale
+ * data.
+ */
+ st->node = st->last = NULL;
return ret;
}