summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/smp.h
diff options
context:
space:
mode:
authorGavin Shan <gshan@redhat.com>2024-08-08 14:08:08 +1000
committerYury Norov <yury.norov@gmail.com>2024-08-08 10:39:41 -0700
commit5819e464a17587e6830cfab05f3e91a9a8753a41 (patch)
tree8451cbcb25be18a6203d6a345079f596d0eab492 /include/asm-arm/smp.h
parent6a0e38264012809afa24113ee2162dc07f4ed22b (diff)
downloadlinux-5819e464a17587e6830cfab05f3e91a9a8753a41.tar.gz
linux-5819e464a17587e6830cfab05f3e91a9a8753a41.tar.bz2
linux-5819e464a17587e6830cfab05f3e91a9a8753a41.zip
cpumask: Fix crash on updating CPU enabled mask
The CPU enabled mask instead of the CPU possible mask should be used by set_cpu_enabled(). Otherwise, we run into crash due to write to the read-only CPU possible mask when vCPU is hot added on ARM64. (qemu) device_add host-arm-cpu,id=cpu1,socket-id=1 Unable to handle kernel write to read-only memory at virtual address ffff800080fa7190 : Call trace: register_cpu+0x1a4/0x2e8 arch_register_cpu+0x84/0xd8 acpi_processor_add+0x480/0x5b0 acpi_bus_attach+0x1c4/0x300 acpi_dev_for_one_check+0x3c/0x50 device_for_each_child+0x68/0xc8 acpi_dev_for_each_child+0x48/0x80 acpi_bus_attach+0x84/0x300 acpi_bus_scan+0x74/0x220 acpi_scan_rescan_bus+0x54/0x88 acpi_device_hotplug+0x208/0x478 acpi_hotplug_work_fn+0x2c/0x50 process_one_work+0x15c/0x3c0 worker_thread+0x2ec/0x400 kthread+0x120/0x130 ret_from_fork+0x10/0x20 Fix it by passing the CPU enabled mask instead of the CPU possible mask to set_cpu_enabled(). Fixes: 51c4767503d5 ("Merge tag 'bitmap-6.11-rc1' of https://github.com:/norov/linux") Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'include/asm-arm/smp.h')
0 files changed, 0 insertions, 0 deletions