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:	Sat, 14 Nov 2009 19:49:11 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2.6.32-rc6] workqueue: fix race condition in
	schedule_on_each_cpu()

On 11/14, Tejun Heo wrote:
>
> 11/14/2009 12:38 AM, Oleg Nesterov wrote:
> > A very minor nit, schedule_on_each_cpu() still checks "orig" twice,
> > perhaps it makes sense to do
> >
> > 	for_each_online_cpu(cpu) {
> > 		struct work_struct *work = per_cpu_ptr(works, cpu);
> >
> > 		INIT_WORK(work, func);
> >
> > 		if (likely(cpu != orig))
> > 			schedule_work_on(cpu, work);
> > 		else
> > 			func(work);
> > 	}
>
> The intention was to schedule works on all other cpus first and then
> execute it on local cpu so that if it takes some time, it doesn't have
> to go through the latency twice.

Ah, indeed, you are right.

Oleg.

--
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