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:	Thu, 26 Nov 2009 17:26:25 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mike Galbraith <efault@....de>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch] sched: fix b5d9d734 blunder in task_new_fair()

On Sun, 2009-11-22 at 13:07 +0100, Mike Galbraith wrote:
> @@ -2589,16 +2588,10 @@ void sched_fork(struct task_struct *p, i
>          */
>         p->prio = current->normal_prio;
>  
> -       if (!rt_prio(p->prio))
> +       if (!task_has_rt_policy(p))
>                 p->sched_class = &fair_sched_class;
>  
> -#ifdef CONFIG_SMP
> -       cpu = p->sched_class->select_task_rq(p, SD_BALANCE_FORK, 0);
> -#endif
> -       local_irq_save(flags);
> -       update_rq_clock(cpu_rq(cpu));
> -       set_task_cpu(p, cpu);
> -       local_irq_restore(flags);
> +       __set_task_cpu(p, cpu); 

OK, so I figured out why it was in sched_fork() and not in
wake_up_new_task().

It is because in sched_fork() the new task isn't in the tasklist yet and
can therefore not race with any other migration logic.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ