• P
    cgroups: revert "cgroups: fix pid namespace bug" · 8f3ff208
    Paul Menage 提交于
    The following series adds a "cgroup.procs" file to each cgroup that
    reports unique tgids rather than pids, and allows all threads in a
    threadgroup to be atomically moved to a new cgroup.
    
    The subsystem "attach" interface is modified to support attaching whole
    threadgroups at a time, which could introduce potential problems if any
    subsystem were to need to access the old cgroup of every thread being
    moved.  The attach interface may need to be revised if this becomes the
    case.
    
    Also added is functionality for read/write locking all CLONE_THREAD
    fork()ing within a threadgroup, by means of an rwsem that lives in the
    sighand_struct, for per-threadgroup-ness and also for sharing a cacheline
    with the sighand's atomic count.  This scheme should introduce no extra
    overhead in the fork path when there's no contention.
    
    The final patch reveals potential for a race when forking before a
    subsystem's attach function is called - one potential solution in case any
    subsystem has this problem is to hang on to the group's fork mutex through
    the attach() calls, though no subsystem yet demonstrates need for an
    extended critical section.
    
    This patch:
    
    Revert
    
    commit 096b7fe0
    Author:     Li Zefan <lizf@cn.fujitsu.com>
    AuthorDate: Wed Jul 29 15:04:04 2009 -0700
    Commit:     Linus Torvalds <torvalds@linux-foundation.org>
    CommitDate: Wed Jul 29 19:10:35 2009 -0700
    
        cgroups: fix pid namespace bug
    
    This is in preparation for some clashing cgroups changes that subsume the
    original commit's functionaliy.
    
    The original commit fixed a pid namespace bug which Ben Blum fixed
    independently (in the same way, but with different code) as part of a
    series of patches.  I played around with trying to reconcile Ben's patch
    series with Li's patch, but concluded that it was simpler to just revert
    Li's, given that Ben's patch series contained essentially the same fix.
    Signed-off-by: NPaul Menage <menage@google.com>
    Cc: Li Zefan <lizf@cn.fujitsu.com>
    Cc: Matt Helsley <matthltc@us.ibm.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    8f3ff208
cgroup.c 102.8 KB