Commit 2f31dbde authored by Hui Tang's avatar Hui Tang Committed by Yipeng Zou
Browse files

sched: clear credit count in error branch

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7EBSH


CVE: NA

-------------------------------

Clear credit count if sched_prefer_cpus_fork failed.

Fixes: 243865da ("cpuset: Introduce new interface for scheduler dynamic affinity")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
Reviewed-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarYipeng Zou <zouyipeng@huawei.com>
parent 5bb07682
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2068,7 +2068,7 @@ static __latent_entropy struct task_struct *copy_process(
#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY
	retval = sched_prefer_cpus_fork(p, current->prefer_cpus);
	if (retval)
		goto bad_fork_free;
		goto bad_fork_cleanup_count;
#endif

	lockdep_assert_irqs_enabled();