Skip to content

Commit fe7a11c

Browse files
Yang YingliangPeter Zijlstra
authored andcommitted
sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate()
If cpuset_cpu_inactive() fails, set_rq_online() need be called to rollback. Fixes: 120455c ("sched: Fix hotplug vs CPU bandwidth control") Cc: stable@kernel.org Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20240703031610.587047-5-yangyingliang@huaweicloud.com
1 parent 2f02735 commit fe7a11c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8022,6 +8022,7 @@ int sched_cpu_deactivate(unsigned int cpu)
80228022
ret = cpuset_cpu_inactive(cpu);
80238023
if (ret) {
80248024
sched_smt_present_inc(cpu);
8025+
sched_set_rq_online(rq, cpu);
80258026
balance_push_set(cpu, false);
80268027
set_cpu_active(cpu, true);
80278028
sched_update_numa(cpu, true);

0 commit comments

Comments
 (0)