hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8710 ---------------------------------------- Currently, the XSched attempts to configure the real-time (RT) priority for tasks without first initializing the thread group ID (tgid). This leads to failures in retrieving the correct priority configuration, as the tgid is required to look up the appropriate settings. To resolve this issue, this commit ensures that the tgid is initialized before attempting to configure the RT priority. Fixes: 3238576f2e8a ("xsched: refactor xsched_entity initialization") Signed-off-by: Liu Kai <liukai284@huawei.com> --- kernel/xsched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/xsched/core.c b/kernel/xsched/core.c index b715b1401043..1d835fc44d0c 100644 --- a/kernel/xsched/core.c +++ b/kernel/xsched/core.c @@ -472,8 +472,6 @@ int init_xsched_entity(struct xsched_context *ctx, struct vstream_info *vs) if (!sched) return -ENOENT; - sched->xse_init(xse); - atomic_set(&xse->kicks_pending_cnt, 0); atomic_set(&xse->submitted_one_kick, 0); @@ -497,6 +495,7 @@ int init_xsched_entity(struct xsched_context *ctx, struct vstream_info *vs) WRITE_ONCE(xse->on_rq, false); spin_lock_init(&xse->xse_lock); + sched->xse_init(xse); return err; } -- 2.34.1