From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C671F3CB2EA for ; Tue, 17 Mar 2026 13:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773753972; cv=none; b=kAzqQ/5nqCaZ0IwzSqmtiQ0PQ7SMy7iw/mgyglHPrLS12l0sfzHGLEUdws0PzLctoeRAMP/TlvFhgtFuz8d2aneI4yqWAnTIqwnEj7simOWLihxrQQZKPXiNIOxGwwLXLyqmJAuUv6kjT9zug1NyGJ7dzT5G6tmrbBv1DvCUOA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773753972; c=relaxed/simple; bh=Rh4ZIHfoxy1wsai6nJ0WNGlOU90ly3Yt8ceGYuI4S1A=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=j/OkrhRgoB/XzDUpHKZzm3PMEqFTiVFAom1eFzKrly+HlEbnCZ+amLFLgk5fV80LTo9aBfVP11g6MkIEOnQx5cJNEya29wnvEPvAtMwySP+I6Cu2Lm6axowAyN06abgro5HRbRSX/2d4ZWA5BILzo9xJ+ssJaHgLaTbtfz1cg10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ana4rlka; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ana4rlka" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF7C2C4CEF7; Tue, 17 Mar 2026 13:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773753972; bh=Rh4ZIHfoxy1wsai6nJ0WNGlOU90ly3Yt8ceGYuI4S1A=; h=Subject:To:Cc:From:Date:From; b=ana4rlkar+fw2r1tqAlXFvgF5+mFM5dIZvHpR2o+E/nfAtAcYDpST2WH5ieM4hQXK EmlG5Nyi9k8R4e7Op3l/JZVdLmiYARiPv3Sr1z2ooMeqwqWk5Bql1n/zhHeI1GXkdg tYQ7zC2PlG3Ov/WntLfnrVpysRJGC9zqB681FWVM= Subject: FAILED: patch "[PATCH] io_uring/eventfd: use ctx->rings_rcu for flags checking" failed to apply to 6.18-stable tree To: axboe@kernel.dk Cc: From: Date: Tue, 17 Mar 2026 14:26:08 +0100 Message-ID: <2026031708-praying-playset-f003@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y git checkout FETCH_HEAD git cherry-pick -x 177c69432161f6e4bab07ccacf8a1748a6898a6b # git commit -s git send-email --to '' --in-reply-to '2026031708-praying-playset-f003@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 177c69432161f6e4bab07ccacf8a1748a6898a6b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 9 Mar 2026 14:35:49 -0600 Subject: [PATCH] io_uring/eventfd: use ctx->rings_rcu for flags checking Similarly to what commit e78f7b70e837 did for local task work additions, use ->rings_rcu under RCU rather than dereference ->rings directly. See that commit for more details. Cc: stable@vger.kernel.org Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS") Signed-off-by: Jens Axboe diff --git a/io_uring/eventfd.c b/io_uring/eventfd.c index 78f8ab7db104..ab789e1ebe91 100644 --- a/io_uring/eventfd.c +++ b/io_uring/eventfd.c @@ -76,11 +76,15 @@ void io_eventfd_signal(struct io_ring_ctx *ctx, bool cqe_event) { bool skip = false; struct io_ev_fd *ev_fd; - - if (READ_ONCE(ctx->rings->cq_flags) & IORING_CQ_EVENTFD_DISABLED) - return; + struct io_rings *rings; guard(rcu)(); + + rings = rcu_dereference(ctx->rings_rcu); + if (!rings) + return; + if (READ_ONCE(rings->cq_flags) & IORING_CQ_EVENTFD_DISABLED) + return; ev_fd = rcu_dereference(ctx->io_ev_fd); /* * Check again if ev_fd exists in case an io_eventfd_unregister call