]> git.baikalelectronics.ru Git - kernel.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 08:50:16 +0000 (10:50 +0200)
commit963eae5ef6e43303db9e8f49f6890df30f8ba075
treee9b7f3d84328547438f0a159b8ae407f2fad3aa9
parentb034454428fb2eeadaf032bce9f13423e91a5c5f
io_uring: honor original task RLIMIT_FSIZE

commit bf9c999d2a64973b31160cc5138b19972ceaf348 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