
From: Hui Tang <tanghui20@huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7D98G CVE: NA ---------------------------------------- smart_grid_usage_dec() should called when free taskgroup if the mode is auto. Signed-off-by: Hui Tang <tanghui20@huawei.com> Reviewed-by: Zhang Qiao <zhangqiao22@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Signed-off-by: Yipeng Zou <zouyipeng@huawei.com> --- kernel/sched/fair.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2e7d27824c3a..73c0ca42b548 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6215,6 +6215,9 @@ static void destroy_auto_affinity(struct task_group *tg) { struct auto_affinity *auto_affi = tg->auto_affinity; + if (auto_affi->mode) + smart_grid_usage_dec(); + hrtimer_cancel(&auto_affi->period_timer); free_affinity_domains(&auto_affi->ad); -- 2.34.1