From: Hui Tang tanghui20@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7HFZV CVE: NA
----------------------------------------
alloc_fair_sched_group should not fail when sd NULL or dcount error.
Fixes: 713cfd2684fa ("sched: Introduce smart grid scheduling strategy for cfs") Signed-off-by: Hui Tang tanghui20@huawei.com Reviewed-by: Chen Hui judy.chenhui@huawei.com Signed-off-by: Zhang Changzhong zhangchangzhong@huawei.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 622d433..3c499b4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5637,7 +5637,7 @@ static int init_affinity_domains(struct affinity_domain *ad)
if (!sd || dcount > AD_LEVEL_MAX) { rcu_read_unlock(); - ret = -EINVAL; + ret = 0; goto err; }