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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Jan 2022 15:50:57 -0800
From:   Tadeusz Struk <tadeusz.struk@...aro.org>
To:     Dietmar Eggemann <dietmar.eggemann@....com>, peterz@...radead.org
Cc:     Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Zhang Qiao <zhangqiao22@...wei.com>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        stable@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzbot+af7a719bc92395ee41b3@...kaller.appspotmail.com
Subject: Re: [PATCH v3] sched/fair: Fix fault in reweight_entity

On 1/26/22 05:53, Dietmar Eggemann wrote:
> Can we then not get rid of `bool update_load` parameter of
> set_load_weight() completely?
> 
> @@ -1214,8 +1214,9 @@ int tg_nop(struct task_group *tg, void *data)
>   }
>   #endif
>   
> -static void set_load_weight(struct task_struct *p, bool update_load)
> +static void set_load_weight(struct task_struct *p)
>   {
> +       int task_new = READ_ONCE(p->__state) & TASK_NEW;
>          int prio = p->static_prio - MAX_RT_PRIO;
>          struct load_weight *load = &p->se.load;
>   
> @@ -1232,7 +1233,7 @@ static void set_load_weight(struct task_struct *p, bool update_load)
>           * SCHED_OTHER tasks have to update their load when changing their
>           * weight
>           */
> -       if (update_load && p->sched_class == &fair_sched_class) {
> +       if (!task_new && p->sched_class == &fair_sched_class) {
>                  reweight_task(p, prio);
>          } else {
>                  load->weight = scale_load(sched_prio_to_weight[prio]);

That will also work. Let's agree on the best way to fix it.
Peter, what's your preference?

-- 
Thanks,
Tadeusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ