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>
Tue, 29 Oct 2024 19:43:27 +0000 (13:43 -0600)
commitd090bffab609762af06dec295a305ce270941b42
treeaad15ea38b3d47fbb7e7ccaef9c81965d9716d84
parent81d8191eb99d95b32e55d09d74f682d40d3e74e9
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