Skip to content
Commit 4022e7af authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: make sure openat/openat2 honor rlimit nofile



Dmitry reports that a test case shows that io_uring isn't honoring a
modified rlimit nofile setting. get_unused_fd_flags() checks the task
signal->rlimi[] for the limits. As this isn't easily inheritable,
provide a __get_unused_fd_flags() that takes the value instead. Then we
can grab it when the request is prepared (from the original task), and
pass that in when we do the async part part of the open.

Reported-by: default avatarDmitry Kadashev <dkadashev@gmail.com>
Tested-by: default avatarDmitry Kadashev <dkadashev@gmail.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f1d96a8f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment