+ cgroups-fix-pid-namespace-bug.patch added to -mm tree

Li Zefan lizf at cn.fujitsu.com
Thu Jul 23 22:26:53 PDT 2009


> Subject: cgroups: fix pid namespace bug
> From: Li Zefan <lizf at cn.fujitsu.com>
> 

Hi Andrew,

Could you queue this fix for .31.

I think there's no more objection to this patch or to queuing it
for .31 instead of .32. And then Benjamin can rebase his patchset
on top of it.

> The bug was introduced by commit cc31edceee04a7b87f2be48f9489ebb72d264844
> ("cgroups: convert tasks file to use a seq_file with shared pid array").
> 
> We cache a pid array for all threads that are opening the same "tasks"
> file, but the pids in the array are always from the namespace of the
> last process that opened the file, so all other threads will read pids
> from that namespace instead of their own namespaces.
> 
> To fix it, we maintain a list of pid arrays, which is keyed by pid_ns.
> The list will be of length 1 at most time.
> 
> Reported-by: Paul Menage <menage at google.com>
> Idea-by: Paul Menage <menage at google.com>
> Signed-off-by: Li Zefan <lizf at cn.fujitsu.com>
> Reviewed-by: Serge Hallyn <serue at us.ibm.com>
> Cc: Balbir Singh <balbir at in.ibm.com>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
> ---


More information about the Containers mailing list