diff options
Diffstat (limited to 'fs/proc/self.c')
-rw-r--r-- | fs/proc/self.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/proc/self.c b/fs/proc/self.c index 113b8d061fc0..dffbe533d53f 100644 --- a/fs/proc/self.c +++ b/fs/proc/self.c @@ -24,6 +24,13 @@ static const char *proc_self_follow_link(struct dentry *dentry, void **cookie) pid_t tgid = task_tgid_nr_ns(current, ns); char *name; + /* + * Not currently supported. Once we can inherit all of struct pid, + * we can allow this. + */ + if (current->flags & PF_KTHREAD) + return ERR_PTR(-EOPNOTSUPP); + if (!tgid) return ERR_PTR(-ENOENT); /* 11 for max length of signed int in decimal + NULL term */ @@ -51,7 +58,7 @@ int proc_setup_self(struct super_block *s) mutex_lock(&root_inode->i_mutex); self = d_alloc_name(s->s_root, "self"); if (self) { - struct inode *inode = new_inode_pseudo(s); + struct inode *inode = new_inode(s); if (inode) { inode->i_ino = self_inum; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |