summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2025-12-04 15:43:31 -0700
committerJens Axboe <axboe@kernel.dk>2025-12-04 15:46:23 -0700
commit78385c7299f7514697d196b3233a91bd5e485591 (patch)
tree4f67ad6d7d08c36e09cc3ef6fb1425d7c89fd79e /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parent525916ce496615f531091855604eab9ca573b195 (diff)
io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
The struct io_uring_buf elements in a buffer ring are in a memory region accessible from userspace. A malicious/buggy userspace program could therefore write to them at any time, so they should be accessed with READ_ONCE() in the kernel. Commit 98b6fa62c84f ("io_uring/kbuf: always use READ_ONCE() to read ring provided buffer lengths") already switched the reads of the len field to READ_ONCE(). Do the same for bid and addr. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers") Cc: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions