io_uring/memmap: explicitly return -EFAULT for mmap on NULL rings
authorJens Axboe <axboe@kernel.dk>
Thu, 24 Oct 2024 16:52:02 +0000 (10:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 24 Oct 2024 16:52:02 +0000 (10:52 -0600)
commit1658b341b9afa1f240521a74d6d8aef500ed9fd0
tree65c81d7b9ba2d97d686b192d1adac935cec1df5f
parent96b083a22cae9eaac57e152145cfd6614bc37420
io_uring/memmap: explicitly return -EFAULT for mmap on NULL rings

The later mapping will actually check this too, but in terms of code
clarify, explicitly check for whether or not the rings and sqes are
valid during validation. That makes it explicit that if they are
non-NULL, they are valid and can get mapped.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/memmap.c