Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84617
b: refs/heads/master
c: 488e5bc
h: refs/heads/master
i:
  84615: fade416
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 8, 2008
1 parent f2294cf commit a85c32c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df5f8314ca30d6a76735748e5ba4ca9809c0f434
refs/heads/master: 488e5bc4560d0b510c1ddc451c51a6cc14e3a930
12 changes: 10 additions & 2 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,15 +2101,23 @@ static const struct file_operations proc_coredump_filter_operations = {
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 tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
sprintf(tmp, "%d", task_tgid_vnr(current));
if (!tgid)
return -ENOENT;
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 tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
sprintf(tmp, "%d", task_tgid_vnr(current));
if (!tgid)
return ERR_PTR(-ENOENT);
sprintf(tmp, "%d", task_tgid_nr_ns(current, ns));
return ERR_PTR(vfs_follow_link(nd,tmp));
}

Expand Down

0 comments on commit a85c32c

Please sign in to comment.