From 73bf1054e80633582fbed911a37c883746fbac74 Mon Sep 17 00:00:00 2001 From: Zheng Zucheng Date: Tue, 28 Sep 2021 11:51:53 +0800 Subject: [PATCH] sched: bugfix setscheduler unlock cpuset_rwsem hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4BUSF CVE: NA -------------------------------- Signed-off-by: Zheng Zucheng Reviewed-by: Chen Hui Signed-off-by: Zheng Zengkai --- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e41cbae19a83..a4bb12447f0d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5552,8 +5552,8 @@ static int __sched_setscheduler(struct task_struct *p, * isolation will be invalid, so return -EINVAL in this case. */ if (unlikely(task_group(p)->qos_level == -1 && !idle_policy(policy))) { - task_rq_unlock(rq, p, &rf); - return -EINVAL; + retval = -EINVAL; + goto unlock; } #endif -- GitLab