From: Yang Yingliang <yangyingliang@xxxxxxxxxx> commit fe7a11c78d2a9bdb8b50afc278a31ac177000948 upstream. If cpuset_cpu_inactive() fails, set_rq_online() need be called to rollback. Fixes: 120455c514f7 ("sched: Fix hotplug vs CPU bandwidth control") Cc: stable@xxxxxxxxxx Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20240703031610.587047-5-yangyingliang@xxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9773,6 +9773,7 @@ int sched_cpu_deactivate(unsigned int cp ret = cpuset_cpu_inactive(cpu); if (ret) { sched_smt_present_inc(cpu); + sched_set_rq_online(rq, cpu); balance_push_set(cpu, false); set_cpu_active(cpu, true); sched_update_numa(cpu, true); Patches currently in stable-queue which might be from yangyingliang@xxxxxxxxxx are queue-6.6/sched-core-introduce-sched_set_rq_on-offline-helper.patch queue-6.6/sched-smt-fix-unbalance-sched_smt_present-dec-inc.patch queue-6.6/sched-smt-introduce-sched_smt_present_inc-dec-helper.patch queue-6.6/sched-core-fix-unbalance-set_rq_online-offline-in-sched_cpu_deactivate.patch