lkml.org 
[lkml]   [2023]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/rt: move back to RT_GROUP_SCHED and rename it child
On Tue, 1 Aug 2023 10:00:30 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Tue, 1 Aug 2023 14:27:14 +0800
> Yajun Deng <yajun.deng@linux.dev> wrote:
>
> > @@ -228,13 +228,10 @@ void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
> > if (!rt_se)
> > return;

Ah, I missed the second part of your change log where you said parent is
only NULL when rt_se is NULL.

I would then add:

if (!rt_se)
return;

if (WARN_ON_ONCE(!parent))
return;

-- Steve


> >
> > - if (!parent)
> > - rt_se->rt_rq = &rq->rt;
> > - else
> > - rt_se->rt_rq = parent->my_q;
> > -
> > + rt_se->rt_rq = parent->my_q;
>
> So when this is called with parent = NULL, this will crash?
>
> -- Steve
>
> > rt_se->my_q = rt_rq;
> > rt_se->parent = parent;
> > + parent->child = rt_se;
> > INIT_LIST_HEAD(&rt_se->run_list);
> > }
> >


\
 
 \ /
  Last update: 2023-08-01 16:03    [W:0.039 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site