io_uring: limit fixed table size by RLIMIT_NOFILE
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Sep 2021 15:35:35 +0000 (09:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:05 +0000 (13:40 +0200)
commit5103b733348e2d39ecee5bb37ed6ead10a0a1129
treef6c572d4cfb23eaf69b8f34a1bde6463aa4c9882
parentebedb252a47f754575ac2486298ba6912924e4bf
io_uring: limit fixed table size by RLIMIT_NOFILE

Limit the number of files in io_uring fixed tables by RLIMIT_NOFILE,
that's the first and the simpliest restriction that we should impose.

Cc: stable@vger.kernel.org
Suggested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b2756c340aed7d6c0b302c26dab50c6c5907f4ce.1629451684.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c