[PATCH OLK-6.6] sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate()

From: Yang Yingliang <yangyingliang@huawei.com> mainline inclusion from mainline-v6.11-rc2 commit fe7a11c78d2a9bdb8b50afc278a31ac177000948 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAQQQ1 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- 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.... Conflicts: kernel/sched/core.c [conflict because of mainline commit e22f910a26cc2a3ac9c66b8e935ef2a7dd881117 ("sched/smt: Fix unbalance sched_smt_present dec/inc") not merged yet] Signed-off-by: He Yujie <coka.heyujie@huawei.com> --- kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7dd2415d90b6..63f7a0daa709 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9816,6 +9816,7 @@ int sched_cpu_deactivate(unsigned int cpu) sched_update_numa(cpu, false); ret = cpuset_cpu_inactive(cpu); if (ret) { + sched_set_rq_online(rq, cpu); balance_push_set(cpu, false); set_cpu_active(cpu, true); sched_update_numa(cpu, true); -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/11506 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/11506 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2...
participants (2)
-
He Yujie
-
patchwork bot