lkml.org 
[lkml]   [2019]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: NULL pointer dereference in pick_next_task_fair
On Wed, Nov 06, 2019 at 06:51:40PM +0300, Kirill Tkhai wrote:
> > +#ifdef CONFIG_SMP
> > + if (!rq->nr_running) {
> > + /*
> > + * Make sure task_on_rq_curr() fails, such that we don't do
> > + * put_prev_task() + set_next_task() on this task again.
> > + */
> > + prev->on_cpu = 2;
> > newidle_balance(rq, rf);
>
> Shouldn't we restore prev->on_cpu = 1 after newidle_balance()? Can't prev
> become pickable again after newidle_balance() releases rq->lock, and we
> take it again, so this on_cpu == 2 never will be cleared?

Indeed so.

\
 
 \ /
  Last update: 2019-11-06 17:55    [W:0.139 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site