lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2ffbd642407a2bc51a387b6f89e74f0f9c9f85cf.camel@gmx.de>
Date: Thu, 03 Oct 2024 06:41:27 +0200
From: Mike Galbraith <efault@....de>
To: Benjamin Segall <bsegall@...gle.com>
Cc: Vishal Chourasia <vishalc@...ux.ibm.com>, Peter Zijlstra
 <peterz@...radead.org>, linux-kernel@...r.kernel.org, Ingo Molnar
 <mingo@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>, Juri
 Lelli <juri.lelli@...hat.com>, Dietmar Eggemann <dietmar.eggemann@....com>,
 Steven Rostedt <rostedt@...dmis.org>, Mel Gorman <mgorman@...e.de>,
 Valentin Schneider <vschneid@...hat.com>, luis.machado@....com
Subject: Re: sched/fair: Kernel panics in pick_next_entity

On Wed, 2024-10-02 at 15:31 -0700, Benjamin Segall wrote:
> Mike Galbraith <efault@....de> writes:
> > 
> > ---
> >  kernel/sched/fair.c |    9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> > 
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -6058,10 +6058,13 @@ void unthrottle_cfs_rq(struct cfs_rq *cf
> >         for_each_sched_entity(se) {
> >                 struct cfs_rq *qcfs_rq = cfs_rq_of(se);
> > 
> > -               if (se->on_rq) {
> > -                       SCHED_WARN_ON(se->sched_delayed);
> > +               /* Handle any unfinished DELAY_DEQUEUE business first. */
> > +               if (se->sched_delayed) {
> > +                       int flags = DEQUEUE_SLEEP | DEQUEUE_DELAYED;
> > +
> > +                       dequeue_entity(qcfs_rq, se, flags);
> > +               } else if (se->on_rq)
> >                         break;
> > -               }
> >                 enqueue_entity(qcfs_rq, se, ENQUEUE_WAKEUP);
> > 
> >                 if (cfs_rq_is_idle(group_cfs_rq(se)))
> 
> Yeah, if we can wind up here to hit that warning, then we need to get it
> out of delay state, not just leave it. Whether dequeue_entity +
> enqueue_entity is better or worse than requeue_delayed_entity (+ break), I really
> don't know.

Hm, I'd say requeue_delayed_entity() not only fits better, it using
less lines gives it an extra brownie point.

	-Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ