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 06978358366 for ; Tue, 17 Mar 2026 13:26:39 +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=1773754000; cv=none; b=hNr/40S8g29tGpjqwYT+R13LErTm6PKbiXD6DdIF55gZ3d77mEk50LBncbGlji0gsihIMu1XoBgKeSOIG6DIIxDHEi8DHCi5tF/um+xxhR4sfQEG4SOVqebD80xRwEICDm8KJzpqpWt/AIxKXKBFAO9f66drKD5Hk/NriIzW1WY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773754000; c=relaxed/simple; bh=eNfTd2MPA3M6lpPZ//3PHXRcs/AD6PFEkhNSQKXd2Fc=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=q4cDe/cKTzhwR2diNzh8z66t0adCit3MTVkKDVIyLlMdL3MNJmIX/O39Ovo8on8w+bRgTAEZGj8qU1G42jubxh+9L6CvhPU6nOP29EtAKmvaL5qwy349vmfpQL7YtmYM8FWx+07PdxL8ahjgEASbafoAUw4FvJJ66wOw7Pi4+SQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ysy7AXsp; 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="Ysy7AXsp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5218BC4CEF7; Tue, 17 Mar 2026 13:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773753999; bh=eNfTd2MPA3M6lpPZ//3PHXRcs/AD6PFEkhNSQKXd2Fc=; h=Subject:To:Cc:From:Date:From; b=Ysy7AXspotq8YY1VRry+YkfNAI1H/7z/CLMQhZsLEjNxu8IR9Ucy4EVpLL5FKbK67 PVOXnMDw1BL5yYNVivNq4VY/PmZMdEPQmUxTf+5glMiCNmoDp3sRujVCi+3IhbRlk5 2u7w+kFC4qFxTNgxUtvyOMO+aJY/ZMnUf8cvKsYA= Subject: FAILED: patch "[PATCH] io_uring/eventfd: use ctx->rings_rcu for flags checking" failed to apply to 6.19-stable tree To: axboe@kernel.dk Cc: From: Date: Tue, 17 Mar 2026 14:26:35 +0100 Message-ID: <2026031735-dividend-tying-23d9@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.19-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.19.y git checkout FETCH_HEAD git cherry-pick -x 177c69432161f6e4bab07ccacf8a1748a6898a6b # git commit -s git send-email --to '' --in-reply-to '2026031735-dividend-tying-23d9@gregkh' --subject-prefix 'PATCH 6.19.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