lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: NULL pointer dereference in pick_next_task_fair
    On Fri, Nov 08, 2019 at 12:55:57PM +0100, Peter Zijlstra wrote:
    > --- a/kernel/sched/core.c
    > +++ b/kernel/sched/core.c
    > @@ -3929,13 +3929,14 @@ pick_next_task(struct rq *rq, struct tas
    > }
    >
    > restart:
    > - /*
    > - * Ensure that we put DL/RT tasks before the pick loop, such that they
    > - * can PULL higher prio tasks when we lower the RQ 'priority'.
    > - */
    > - prev->sched_class->put_prev_task(rq, prev, rf);
    > - if (!rq->nr_running)
    > - newidle_balance(rq, rf);
    > +#ifdef CONFIG_SMP
    /*
    * We must do the balancing pass before put_next_task(), such
    * that when we release the rq->lock the task is in the same
    * state as before we took rq->lock.
    *
    * We can terminate the balance pass as soon as we know there is
    * a runnable task of @class priority or higher.
    */
    > + for_class_range(class, prev->sched_class, &idle_sched_class) {
    > + if (class->balance(rq, prev, rf))
    > + break;
    > + }
    > +#endif
    > +
    > + put_prev_task(rq, prev);
    >
    > for_each_class(class) {
    > p = class->pick_next_task(rq, NULL, NULL);

    \
     
     \ /
      Last update: 2019-11-08 13:53    [W:3.699 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site