aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
authorJens Axboe <axboe@kernel.dk>2026-06-11 20:27:22 -0600
committerJens Axboe <axboe@kernel.dk>2026-06-13 06:26:53 -0600
commited64f5c546b3d5e3a4840f6c055448ce90edf56c (patch)
treee8dc51ff5f5d1ff3b5b3c377d561dcdf901202ab /io_uring
parent753f81b3b8d78d1e34872b9c14dff3a841ada4b4 (diff)
downloadath-ed64f5c546b3d5e3a4840f6c055448ce90edf56c.tar.gz
io_uring: grab RCU read lock marking task run
Not required right now, as io_req_local_work_add() already calls this helper with the RCU read lock held. But in preparation for that not being the case, grab it locally. Reviewed-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/tw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io_uring/tw.c b/io_uring/tw.c
index 023d5e6bc491a..f4335c8d50d93 100644
--- a/io_uring/tw.c
+++ b/io_uring/tw.c
@@ -158,11 +158,11 @@ void tctx_task_work(struct callback_head *cb)
*/
static void io_ctx_mark_taskrun(struct io_ring_ctx *ctx)
{
- lockdep_assert_in_rcu_read_lock();
-
if (ctx->flags & IORING_SETUP_TASKRUN_FLAG) {
- struct io_rings *rings = rcu_dereference(ctx->rings_rcu);
+ struct io_rings *rings;
+ guard(rcu)();
+ rings = rcu_dereference(ctx->rings_rcu);
atomic_or(IORING_SQ_TASKRUN, &rings->sq_flags);
}
}