aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorLai Jiangshan <[email protected]>2014-07-31 11:30:17 +0800
committerThomas Gleixner <[email protected]>2015-01-23 11:33:51 +0100
commit4bee96860a65c3a62d332edac331b3cf936ba3ad (patch)
tree255638c13a74a54fd7ea71cb4d9dbe0a591a98ce /lib/memory-notifier-error-inject.c
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread()
The following race exists in the smpboot percpu threads management: CPU0 CPU1 cpu_up(2) get_online_cpus(); smpboot_create_threads(2); smpboot_register_percpu_thread(); for_each_online_cpu(); __smpboot_create_thread(); __cpu_up(2); This results in a missing per cpu thread for the newly onlined cpu2 and in a NULL pointer dereference on a consecutive offline of that cpu. Proctect smpboot_register_percpu_thread() with get_online_cpus() to prevent that. [ tglx: Massaged changelog and removed the change in smpboot_unregister_percpu_thread() because that's an optimization and therefor not stable material. ] Signed-off-by: Lai Jiangshan <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srivatsa S. Bhat <[email protected]> Cc: David Rientjes <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions