OSDN Git Service

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>
Thu, 1 Oct 2020 02:32:32 +0000 (20:32 -0600)
commit9b8284921513fc1ea57d87777283a59b05862f03
treee9189b99746af8e30db89f81b025fd1d7e282431
parent0f2122045b946241a9e549c2a76cea54fa58a7ff
io_uring: reference ->nsproxy for file table commands

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