]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: honor original task RLIMIT_FSIZE
authorJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 17:23:41 +0000 (11:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:13:37 +0000 (16:13 +0200)
commit04a9f66062b8bfbed8043e9a9081b6b3f2f2157a
tree92d2a09cfe73780e6088eb4a5a7799213068fce6
parentce5994942e00004bcc5f8ce637272f4680fa9c49
io_uring: honor original task RLIMIT_FSIZE

commit 4ed734b0d0913e566a9d871e15d24eb240f269f7 upstream.

With the previous fixes for number of files open checking, I added some
debug code to see if we had other spots where we're checking rlimit()
against the async io-wq workers. The only one I found was file size
checking, which we should also honor.

During write and fallocate prep, store the max file size and override
that for the current ask if we're in io-wq worker context.

Cc: stable@vger.kernel.org # 5.1+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c