]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2024 07:34:01 +0000 (09:34 +0200)
commit52bbae429b86d9d335ba5c6819e9bdf906a47590
tree0062e7b658d23db89f4c80906e11e83e7279fcf2
parentc5a51cfe943dbe24408c4f77989581b982274ea8
cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()

commit 932d8476399f622aa0767a4a0a9e78e5341dc0e1 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cpu.c