cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()
authorYuntao Wang <ytcoode@gmail.com>
Wed, 15 May 2024 13:45:54 +0000 (21:45 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Jun 2024 13:08:04 +0000 (15:08 +0200)
commit932d8476399f622aa0767a4a0a9e78e5341dc0e1
tree8d065ad2a65252ba9ba1d43a266aecffd884a3f9
parent6ba59ff4227927d3a8530fc2973b80e94b54d58f
cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()

Commit 4205e4786d0b ("cpu/hotplug: Provide dynamic range for prepare
stage") added a dynamic range for the prepare states, but did not handle
the assignment of the dynstate variable in __cpuhp_setup_state_cpuslocked().

This causes the corresponding startup callback not to be invoked when
calling __cpuhp_setup_state_cpuslocked() with the CPUHP_BP_PREPARE_DYN
parameter, even though it should be.

Currently, the users of __cpuhp_setup_state_cpuslocked(), for one reason or
another, have not triggered this bug.

Fixes: 4205e4786d0b ("cpu/hotplug: Provide dynamic range for prepare stage")
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240515134554.427071-1-ytcoode@gmail.com
kernel/cpu.c