From: Hui Tang tanghui20@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7EBSH CVE: NA
-------------------------------
Clear credit count if sched_prefer_cpus_fork failed.
Fixes: 243865da2684 ("cpuset: Introduce new interface for scheduler dynamic affinity") Signed-off-by: Hui Tang tanghui20@huawei.com Reviewed-by: Zhang Qiao zhangqiao22@huawei.com Signed-off-by: Zhang Changzhong zhangchangzhong@huawei.com --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/fork.c b/kernel/fork.c index 8ca83c09..bfc4534 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1878,7 +1878,7 @@ static __latent_entropy struct task_struct *copy_process( #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY retval = sched_prefer_cpus_fork(p, current); if (retval) - goto bad_fork_free; + goto bad_fork_cleanup_count; #endif #ifdef CONFIG_QOS_SCHED_SMART_GRID retval = sched_grid_qos_fork(p, current);