Skip to content

Commit 530b0b6

Browse files
committed
Merge tag 'io_uring-7.0-20260227' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring fixes from Jens Axboe: "Just two minor patches in here, ensuring the use of READ_ONCE() for sqe field reading is consistent across the codebase. There were two missing cases, now they are covered too" * tag 'io_uring-7.0-20260227' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring/timeout: READ_ONCE sqe->addr io_uring/cmd_net: use READ_ONCE() for ->addr3 read
2 parents 764a167 + 85f6c43 commit 530b0b6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

io_uring/cmd_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int io_uring_cmd_getsockname(struct socket *sock,
146146
return -EINVAL;
147147

148148
uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
149-
ulen = u64_to_user_ptr(sqe->addr3);
149+
ulen = u64_to_user_ptr(READ_ONCE(sqe->addr3));
150150
peer = READ_ONCE(sqe->optlen);
151151
if (peer > 1)
152152
return -EINVAL;

io_uring/timeout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ int io_timeout_remove_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
462462
tr->ltimeout = true;
463463
if (tr->flags & ~(IORING_TIMEOUT_UPDATE_MASK|IORING_TIMEOUT_ABS))
464464
return -EINVAL;
465-
if (get_timespec64(&tr->ts, u64_to_user_ptr(sqe->addr2)))
465+
if (get_timespec64(&tr->ts, u64_to_user_ptr(READ_ONCE(sqe->addr2))))
466466
return -EFAULT;
467467
if (tr->ts.tv_sec < 0 || tr->ts.tv_nsec < 0)
468468
return -EINVAL;
@@ -557,7 +557,7 @@ static int __io_timeout_prep(struct io_kiocb *req,
557557
data->req = req;
558558
data->flags = flags;
559559

560-
if (get_timespec64(&data->ts, u64_to_user_ptr(sqe->addr)))
560+
if (get_timespec64(&data->ts, u64_to_user_ptr(READ_ONCE(sqe->addr))))
561561
return -EFAULT;
562562

563563
if (data->ts.tv_sec < 0 || data->ts.tv_nsec < 0)

0 commit comments

Comments
 (0)