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:   Mon, 9 Jul 2018 11:01:41 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] sched/core: remove get_cpu() from sched_fork()

On Fri, Jul 06, 2018 at 03:32:00PM +0200, Sebastian Andrzej Siewior wrote:
> On 2018-07-06 15:18:08 [+0200], Peter Zijlstra wrote:
> > On Fri, Jul 06, 2018 at 03:06:15PM +0200, Sebastian Andrzej Siewior wrote:
> > > Based on this it is possible to remove get_cpu() and use
> > > smp_processor_id() for the `cpu' variable without breaking anything.
> > 
> > Almost.. I think, see init_task_preempt_count().
> 
>  #define init_task_preempt_count(p) do { \
>          task_thread_info(p)->preempt_count = FORK_PREEMPT_COUNT; \
>  } while (0)
> 
> and task_thread_info() references p only. It looks good, what did I
> miss?

Argh, dammit, I read that with p == current :/

Then yes, looks ok.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ