OSDN Git Service

proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 31 Jul 2014 10:22:30 +0000 (03:22 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 4 Aug 2014 17:07:13 +0000 (10:07 -0700)
In oddball cases where the thread has a different network namespace
than the primary thread group leader or more likely in cases where
the thread remains and the thread group leader has exited this
ensures that /proc/net continues to work.

This should not cause any problems but if it does this patch can just
be reverted.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/proc/proc_net.c

index a63af3e..3948102 100644 (file)
@@ -226,7 +226,7 @@ static struct pernet_operations __net_initdata proc_net_ns_ops = {
 
 int __init proc_net_init(void)
 {
-       proc_symlink("net", NULL, "self/net");
+       proc_symlink("net", NULL, "thread-self/net");
 
        return register_pernet_subsys(&proc_net_ns_ops);
 }