summaryrefslogtreecommitdiff
path: root/include/asm-cris/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-03-31 07:07:47 -0600
committerJens Axboe <axboe@kernel.dk>2026-04-01 08:34:11 -0600
commit61a11cf4812726aceaee17c96432e1c08f6ed6cb (patch)
tree7c219c9655b4183442d2add37d9fc40f8d8eee6f /include/asm-cris/git@git.tavy.me:linux.git
parent111a12b422a8cfa93deabaef26fec48237163214 (diff)
io_uring: protect remaining lockless ctx->rings accesses with RCU
Commit 96189080265e addressed one case of ctx->rings being potentially accessed while a resize is happening on the ring, but there are still a few others that need handling. Add a helper for retrieving the rings associated with an io_uring context, and add some sanity checking to that to catch bad uses. ->rings_rcu is always valid, as long as it's used within RCU read lock. Any use of ->rings_rcu or ->rings inside either ->uring_lock or ->completion_lock is sane as well. Do the minimum fix for the current kernel, but set it up such that this basic infra can be extended for later kernels to make this harder to mess up in the future. Thanks to Junxi Qian for finding and debugging this issue. Cc: stable@vger.kernel.org Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS") Reviewed-by: Junxi Qian <qjx1298677004@gmail.com> Tested-by: Junxi Qian <qjx1298677004@gmail.com> Link: https://lore.kernel.org/io-uring/20260330172348.89416-1-qjx1298677004@gmail.com/ Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/asm-cris/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions