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]
Date:	Mon, 29 Feb 2016 20:09:50 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Alexander Gordeev <agordeev@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 1/2] sched/core: Get rid of 'cpu' argument in
 wq_worker_sleeping()

On 02/28, Alexander Gordeev wrote:
>
> -struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu)
> +struct task_struct *wq_worker_sleeping(struct task_struct *task)
>  {
>  	struct worker *worker = kthread_data(task), *to_wakeup = NULL;
>  	struct worker_pool *pool;
> @@ -886,7 +886,7 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu)
>  	pool = worker->pool;
>  
>  	/* this can only happen on the local cpu */
> -	if (WARN_ON_ONCE(cpu != raw_smp_processor_id() || pool->cpu != cpu))
> +	if (WARN_ON_ONCE(pool->cpu != smp_processor_id()))
>  		return NULL;

I think both changes are fine, but perhaps it would be better to keep
raw_smp_processor_id(). Unless you did this on purpose, but then it makes
sense to add a note into the changelog.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ