diff options
| author | Caleb Sander Mateos <csander@purestorage.com> | 2026-01-30 10:14:13 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-31 06:36:11 -0700 |
| commit | ed9f54cc1e335096733aed03c2a46de3d58922ed (patch) | |
| tree | df260d66551f6f558df75182248d9896e43517ff /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | da7e4b75e50c087d2031a92f6646eb90f7045a67 (diff) | |
ublk: use READ_ONCE() to read struct ublksrv_ctrl_cmd
struct ublksrv_ctrl_cmd is part of the io_uring_sqe, which may lie in
userspace-mapped memory. It's racy to access its fields with normal
loads, as userspace may write to them concurrently. Use READ_ONCE() to
copy the ublksrv_ctrl_cmd from the io_uring_sqe to the stack. Use the
local copy in place of the one in the io_uring_sqe.
Fixes: 87213b0d847c ("ublk: allow non-blocking ctrl cmds in IO_URING_F_NONBLOCK issue")
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
