io_uring: reference ->nsproxy for file table commands
authorJens Axboe <axboe@kernel.dk>
Sat, 19 Sep 2020 02:13:06 +0000 (20:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Oct 2020 20:59:33 +0000 (14:59 -0600)
commit291017f8ad7f58e52072d8b061dece287c908206
tree269214ef68c33e41ade271800bc74eefc4bfde4d
parent2c82c90c7277f1fc1eccadf4098c335aa3178ad6
io_uring: reference ->nsproxy for file table commands

commit 9b8284921513fc1ea57d87777283a59b05862f03 upstream.

If we don't get and assign the namespace for the async work, then certain
paths just don't work properly (like /dev/stdin, /proc/mounts, etc).
Anything that references the current namespace of the given task should
be assigned for async work on behalf of that task.

Cc: stable@vger.kernel.org # v5.5+
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io-wq.h
fs/io_uring.c