hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID8IIO ----------------------------------------- The WARN_ON() failure case returned without releasing old_xcg->lock, leading to possible deadlocks. Fix by unlocking before returning. Fixes: 43bbefc53356 ("xsched: Add XCU control group implementation and its backend in xsched CFS") Signed-off-by: Zicheng Qu <quzicheng@huawei.com> --- kernel/xsched/cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/xsched/cgroup.c b/kernel/xsched/cgroup.c index f7eeedc80fc3..835508325536 100644 --- a/kernel/xsched/cgroup.c +++ b/kernel/xsched/cgroup.c @@ -432,6 +432,7 @@ void xcu_move_task(struct task_struct *task, struct xsched_group *old_xcg, if (old_xcg != xse->parent_grp) { WARN_ON(old_xcg != xse->parent_grp); + spin_unlock(&old_xcg->lock); return; } -- 2.34.1