diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2024-07-03 11:16:10 +0800 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-07-29 12:22:33 +0200 |
commit | fe7a11c78d2a9bdb8b50afc278a31ac177000948 (patch) | |
tree | 9b5a4e28e29d500754e20dc653d2e3118ebe43cc /kernel | |
parent | 2f027354122f58ee846468a6f6b48672fff92e9b (diff) | |
download | linux-stable-fe7a11c78d2a9bdb8b50afc278a31ac177000948.tar.gz linux-stable-fe7a11c78d2a9bdb8b50afc278a31ac177000948.tar.bz2 linux-stable-fe7a11c78d2a9bdb8b50afc278a31ac177000948.zip |
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: 120455c514f7 ("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
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4d119e930beb..f3951e4a55e5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8022,6 +8022,7 @@ int sched_cpu_deactivate(unsigned int cpu) 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); |