Re: [PATCH 1/3] cgroup: simplify double-check locking in cgroup_attach_proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Acked-by: Li Zefan <lizf@xxxxxxxxxxxxxx>

> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Li Zefan <lizf@xxxxxxxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Cc: cgroups@xxxxxxxxxxxxxxx
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Paul Menage <paul@xxxxxxxxxxxxxx>
> ---
>  kernel/cgroup.c |   79 ++++++++++++++++++++----------------------------------
>  1 files changed, 29 insertions(+), 50 deletions(-)
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux