UPSTREAM: Revert "proc: don't allow async path resolution of /proc/thread-self components"

[ Upstream commit 2587890b5e2892dfecaa5e5126bdac8076a4e6f7 ]

This reverts commit 0d4370cfe36b7f1719123b621a4ec4d9c7a25f89.

No longer needed, as the io-wq worker threads have the right identity.

Change-Id: I7a28e02a0a1911555853cf4046e3a09c7e36d4a2
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 87cb08dc6b)
Bug: 268174392
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Jens Axboe 2021-02-15 13:42:18 -07:00 committed by Greg Kroah-Hartman
parent 0416989d89
commit 9ed224ea34
2 changed files with 1 additions and 8 deletions

View File

@ -20,7 +20,7 @@ static const char *proc_self_get_link(struct dentry *dentry,
* Not currently supported. Once we can inherit all of struct pid,
* we can allow this.
*/
if (current->flags & PF_IO_WORKER)
if (current->flags & PF_KTHREAD)
return ERR_PTR(-EOPNOTSUPP);
if (!tgid)

View File

@ -17,13 +17,6 @@ static const char *proc_thread_self_get_link(struct dentry *dentry,
pid_t pid = task_pid_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_IO_WORKER)
return ERR_PTR(-EOPNOTSUPP);
if (!pid)
return ERR_PTR(-ENOENT);
name = kmalloc(10 + 6 + 10 + 1, dentry ? GFP_KERNEL : GFP_ATOMIC);