Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b55fcb22d445a7460cbbc138ceae096d5617715a
Commit:     b55fcb22d445a7460cbbc138ceae096d5617715a
Parent:     0cf975e16927fd70f34cee20d3856246c13bb4c8
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 15:00:43 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 15:33:32 2008 -0800

    revert "proc: fix the threaded proc self"
    
    Revert commit c6caeb7c4544608e8ae62731334661fc396c7f85 ("proc: fix the
    threaded /proc/self"), since Eric says "The patch really is wrong.
    There is at least one corner case in procps that cares."
    
    Cc: Eric W. Biederman <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: "Guillaume Chazarain" <[EMAIL PROTECTED]>
    Cc: "Pavel Emelyanov" <[EMAIL PROTECTED]>
    Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Roland McGrath <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/proc/base.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index a0c4ba6..7c6b4ec 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2102,22 +2102,22 @@ static int proc_self_readlink(struct dentry *dentry, 
char __user *buffer,
                              int buflen)
 {
        struct pid_namespace *ns = dentry->d_sb->s_fs_info;
-       pid_t pid = task_pid_nr_ns(current, ns);
+       pid_t tgid = task_tgid_nr_ns(current, ns);
        char tmp[PROC_NUMBUF];
-       if (!pid)
+       if (!tgid)
                return -ENOENT;
-       sprintf(tmp, "%d", pid);
+       sprintf(tmp, "%d", tgid);
        return vfs_readlink(dentry,buffer,buflen,tmp);
 }
 
 static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct pid_namespace *ns = dentry->d_sb->s_fs_info;
-       pid_t pid = task_pid_nr_ns(current, ns);
+       pid_t tgid = task_tgid_nr_ns(current, ns);
        char tmp[PROC_NUMBUF];
-       if (!pid)
+       if (!tgid)
                return ERR_PTR(-ENOENT);
-       sprintf(tmp, "%d", pid);
+       sprintf(tmp, "%d", task_tgid_nr_ns(current, ns));
        return ERR_PTR(vfs_follow_link(nd,tmp));
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to