• Ben Blum's avatar
    Previously there was the problem in which two processes from different pid · cc0f79f0
    Ben Blum authored
    namespaces reading the tasks or procs file could result in one process
    seeing results from the other's namespace.  Rather than one pidlist for
    each file in a cgroup, we now keep a list of pidlists keyed by namespace
    and file type (tasks versus procs) in which entries are placed on demand. 
    Each pidlist has its own lock, and that the pidlists themselves are passed
    around in the seq_file's private pointer means we don't have to touch the
    cgroup or its master list except when creating and destroying entries.
    Signed-off-by: default avatarBen Blum <bblum@google.com>
    Signed-off-by: default avatarPaul 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    cc0f79f0
cgroup.c 107 KB