]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: make sure accept honor rlimit nofile
authorJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 02:16:56 +0000 (20:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 14:48:36 +0000 (08:48 -0600)
commitf5297d51ecd5312b4488671f9aecba38cc08d4db
tree19e373248dd2c3db726505ff186de50f2d99b6cd
parent1730cc8eda6f65d42a6f8537d7b5c2a905c4fa27
io_uring: make sure accept honor rlimit nofile

Just like commit 1730cc8eda6f, this fixes the fact that
IORING_OP_ACCEPT ends up using get_unused_fd_flags(), which checks
current->signal->rlim[] for limits.

Add an extra argument to __sys_accept4_file() that allows us to pass
in the proper nofile limit, and grab it at request prep time.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/linux/socket.h
net/socket.c