diff --git a/fs/proc/self.c b/fs/proc/self.c index 398cdf9a9f0c6..eba167e1700ef 100644 --- a/fs/proc/self.c +++ b/fs/proc/self.c @@ -15,6 +15,13 @@ static const char *proc_self_get_link(struct dentry *dentry, 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 */