From: Jens Axboe Date: Fri, 12 Jun 2026 02:27:22 +0000 (-0600) Subject: io_uring: grab RCU read lock marking task run X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed64f5c546b3d5e3a4840f6c055448ce90edf56c;p=thirdparty%2Flinux.git 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 Signed-off-by: Jens Axboe --- 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); } }