Any SQE read should use READ_ONCE(), to ensure the result is read once
and only once. Doesn't really matter for this case, but it's better to
keep these 100% consistent and always use READ_ONCE() for the prep side
of SQE handling.
Fixes: 5d24321e4c15 ("io_uring: Introduce getsockname io_uring cmd")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
return -EINVAL;
uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
- ulen = u64_to_user_ptr(sqe->addr3);
+ ulen = u64_to_user_ptr(READ_ONCE(sqe->addr3));
peer = READ_ONCE(sqe->optlen);
if (peer > 1)
return -EINVAL;