Skip to content
Commit 40f45fe8 authored by Jens Axboe's avatar Jens Axboe
Browse files

userfaultfd: convert to ->read_iter()



Rather than use the older style ->read() hook, use ->read_iter() so that
userfaultfd can support both O_NONBLOCK and IOCB_NOWAIT for non-blocking
read attempts.

Split the fd setup into two parts, so that userfaultfd can mark the file
mode with FMODE_NOWAIT before installing it into the process table. With
that, we can also defer grabbing the mm until we know the rest will
succeed, as the fd isn't visible before then.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d9497990
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