Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B61423AF66C for ; Mon, 31 Aug 2026 12:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788178973; cv=none; b=CtYC3wIX2AEqX08cMfceU3o4j+auJ6jl9VLZIvxRI+qz3wQ4WVbaeoHecIJnOCyak7+dP9UIjdNQoFPgvRmD2Rd/Kf5wxwhUuPRUlOs/xKuTKJ8WVYOLAk77ozCLabFGAPGoK3o1Y4S/NeVKU/Or8emaRtQz9vN/HlFreNiLojg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788178973; c=relaxed/simple; bh=k9ZrELKr8y6/n4RfArwSwAduOmhTbnsliC2ZLjbEM2Y=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=qAt7UAETFKYpQZ6ifChJckaAZMZFRqRZSmsqaTRtQVL71cPjh0ABQLVSU5mulszfZWHuX26atB3UenKI2oLBAwDLMDdnk4O+mn6+rjPvISi7LkdLOP8cuUkIvQHON/Zg6lou1UMPbQSfG6BJ6YpG+trWDmlqKLDFuKL0/l1ofvE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IsBtkdHR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IsBtkdHR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DCAF1F000E9; Mon, 31 Aug 2026 12:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788178972; bh=I4UnSRia3rTnAzYJDoB3dRxVInLwANasOBIeTrwxJM4=; h=Subject:To:Cc:From:Date; b=IsBtkdHR2xohrxwzoIWo+swEPkAhrG3VEDdJCoBw8ApeODNzOUyVdvOHQWhPwkV4N 1Wwvxln2Z3uBbflwr3tOyZxJGq9rbR902YxwOOuMam2kGFm/Kbj5UzCXu6s360jfpq rZQ8Z2E2wvPi4PG394RLZIeqoW9nVBVxajyYrpro= Subject: FAILED: patch "[PATCH] fuse: fix missing barrier when checking io-uring readiness" failed to apply to 6.18-stable tree To: joannelkoong@gmail.com,bernd@bsbernd.com,mszeredi@redhat.com Cc: From: Date: Mon, 31 Aug 2026 14:22:42 +0200 Message-ID: <2026083142-tingly-scarecrow-e145@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 edb310bc27f0ad83e7fd558a3caf1a94ca511654 # git commit -s git send-email --to '' --in-reply-to '2026083142-tingly-scarecrow-e145@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From edb310bc27f0ad83e7fd558a3caf1a94ca511654 Mon Sep 17 00:00:00 2001 From: Joanne Koong Date: Thu, 16 Jul 2026 11:31:42 -0700 Subject: [PATCH] fuse: fix missing barrier when checking io-uring readiness fuse_block_alloc() reads fch->initialized and then fch->io_uring. fch->io_uring is set before fch->initialized, ordered by the smp_wmb() in fuse_chan_set_intialized(), but fuse_block_alloc() has no matching read barrier between the two loads. This may lead a CPU to observe fch->initialized=1 but fch->io_uring=0, and skip the check that blocks request allocation until the io-uring queues are ready. This can reintroduce the lock-order inversion deadlock that commit 3393ff964e0f prevents. Add an smp_rmb() barrier to pair with the smp_wmb() in fuse_chan_set_initialized() to prevent this. Fixes: 3393ff964e0f ("fuse: block request allocation until io-uring init is complete") Cc: stable@vger.kernel.org Reviewed-by: Bernd Schubert Signed-off-by: Joanne Koong Signed-off-by: Miklos Szeredi diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 7e81dea4f1c7..a27ea64d763a 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -85,7 +85,13 @@ void fuse_chan_set_initialized(struct fuse_chan *fch, struct fuse_chan_param *pa static bool fuse_block_alloc(struct fuse_chan *fch, bool for_background) { - return !fch->initialized || (for_background && fch->blocked) || + if (!fch->initialized) + return true; + + /* Pairs with smp_wmb() in fuse_chan_set_initialized() */ + smp_rmb(); + + return (for_background && fch->blocked) || (fch->io_uring && fch->connected && !fuse_uring_ready(fch)); } @@ -120,9 +126,6 @@ static struct fuse_req *fuse_get_req(struct fuse_chan *fch, bool for_background) goto out; } - /* Matches smp_wmb() in fuse_chan_set_initialized() */ - smp_rmb(); - err = -ENOTCONN; if (!fch->connected) goto out;