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, 05 Jan 2012 10:08:15 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Mandeep Singh Baines <msb@...omium.org>
CC:	Tejun Heo <tj@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, cgroups@...r.kernel.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Paul Menage <paul@...lmenage.org>
Subject: Re: [PATCH 1/3] cgroup: simplify double-check locking in cgroup_attach_proc

Mandeep Singh Baines wrote:
> To keep the complexity of the double-check locking in one place,
> I moved the thread_group_leader check up into attach_task_by_pid.
> This allows us to use a goto instead of returning -EAGAIN.
> 
> While at it, converted a couple of returns to gotos and used
> rcu for the !pid case also in order to simplify the logic.
> 
> Changes in V2:
> * https://lkml.org/lkml/2011/12/22/86 (Tejun Heo)
>   * Use a goto instead of returning -EAGAIN
> 
> Signed-off-by: Mandeep Singh Baines <msb@...omium.org>

Acked-by: Li Zefan <lizf@...fujitsu.com>

> Cc: Tejun Heo <tj@...nel.org>
> Cc: Li Zefan <lizf@...fujitsu.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: containers@...ts.linux-foundation.org
> Cc: cgroups@...r.kernel.org
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Paul Menage <paul@...lmenage.org>
> ---
>  kernel/cgroup.c |   79 ++++++++++++++++++++----------------------------------
>  1 files changed, 29 insertions(+), 50 deletions(-)
--
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