Commit 5d8087c3 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] revert the /proc thread visibility fix

It appears that gdb, perfmon and perhaps other applications are already
opening /proc/<tid> even though it does not appear in /proc readdir output
and is available under its group leader's directory anyway.

Apparently ascertaining the group leader is hard for gdb and thsi trick
always worked for LinuxThreads apps.

So revert this change.
parent 12f6f861
......@@ -1582,13 +1582,14 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
read_unlock(&tasklist_lock);
if (!task)
goto out;
if (!thread_group_leader(task))
goto out_drop_task;
inode = proc_pid_make_inode(dir->i_sb, task, PROC_TGID_INO);
if (!inode)
goto out_drop_task;
if (!inode) {
put_task_struct(task);
goto out;
}
inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
......@@ -1613,8 +1614,6 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
goto out;
}
return NULL;
out_drop_task:
put_task_struct(task);
out:
return ERR_PTR(-ENOENT);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment