Message ID | 20201201084638.166527632@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/fs/proc/self.c b/fs/proc/self.c index 2dcc2558b3aa7..dffbe533d53fc 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 */