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>
Fri, 25 Oct 2024 14:05:59 +0000 (08:05 -0600)
commit465123b222f5e342d36fb285600332dea898af65
tree2fd7467098b06c5633fe0965f0b8a70efea17279
parented6fb07254d12249753aaab88c5686104c919a40
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