Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3586212pxb; Mon, 24 Jan 2022 12:53:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7dUzJasuZSl07vEYTZaS+0qojfrbd5eh2HmPbnS4GEzIfmQGMv737JjqQ3TaACSY4L736 X-Received: by 2002:a17:902:b718:b0:143:72b7:409e with SMTP id d24-20020a170902b71800b0014372b7409emr15835003pls.28.1643057598688; Mon, 24 Jan 2022 12:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643057598; cv=none; d=google.com; s=arc-20160816; b=JBWj8jLDylimJbRMStrbM2E3LTL2cIhHIe+bxvQC7PIR/mzTurl7M6M1gBLiZK2YS6 xP1l/WCzyP5gFrg9RoSZ75rMObeQwFoHMA1QXw0OQRGAreTUyjUuM6Kgfx1H2ODPhH66 PzD3/Xp6N5ZdSdBUkj/wnUyv3SAyzHeCrra1iv4Z6xqATBz1vqcLtioY3izKeKdP7xBO ej77rjAEgAIriCswTUpfM1p5b00kUZ57CT4aL4vzb6lqEb9eXfdflpKCWzs+gb0W5bNU gLeBFDJX3M/+XO4ftggehuEeD03JxebfhmpuIqj/mGYMAr3OH3G5N6OHiUkMsa7dFz9M US4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=536tpBHJz6KFNJxYWNdRouHaqOodSBRdIih/HsqWE2c=; b=y15b6SufhpaXj/mekfUyorc65FRa0l/isGRkDaEfScbPPAP76ax8J3Y4WtqmmN5wdU 9P5RcFivTpgtWvb16R8hxJ8BTaMrkS0gRx7hbwi3vouVExf32U0s3iw0WZ9VA5z/3l+o fTlOoRCNNLOYD5UO/34SmPlKYFccFNrw7stT5OmnubHW4oUy8Vn6HNeSuNv5p0pGcyu7 ityj5y51G+DFUGp2MASh0WAK/btjUlN+rhGjwJ0eb4Zgql/ykLlRfPC87sQUl1RPEXqb oSDna9ccx+Yc0hTIta6KccPzI9fR9U5WnxBwlBBwuOWFoxR/wgT9EkRSgm/CRQ3SNyw7 kZ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x0hJoRZC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si4577934plg.24.2022.01.24.12.53.05; Mon, 24 Jan 2022 12:53:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x0hJoRZC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354440AbiAXUJO (ORCPT + 99 others); Mon, 24 Jan 2022 15:09:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345252AbiAXTvT (ORCPT ); Mon, 24 Jan 2022 14:51:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4988C019B3B; Mon, 24 Jan 2022 11:24:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D857612FA; Mon, 24 Jan 2022 19:24:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4734EC340E5; Mon, 24 Jan 2022 19:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052256; bh=8fEnRPti32v240Rgrcx2wQprpQYqogqlTQ6lb/w3fLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x0hJoRZC/7xffE2lqPaxB2Y+sJfQpYFUpHVDNJVz8Ce4SuaPD9AwQFHtSIzXbn4rG w/rF15M3quTmiN33r7l0DD/2KjlL2hodeOQFvpAdkpsGNaOwjhpYk68/2b4rFNv21w +ZXTVa2w3RXlLf4sqk9qrRyLOLdRloyYlBo5nCBw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Amir Goldstein , Miklos Szeredi , Ben Hutchings Subject: [PATCH 4.19 239/239] fuse: fix live lock in fuse_iget() Date: Mon, 24 Jan 2022 19:44:37 +0100 Message-Id: <20220124183950.693455840@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amir Goldstein commit 775c5033a0d164622d9d10dd0f0a5531639ed3ed upstream. Commit 5d069dbe8aaf ("fuse: fix bad inode") replaced make_bad_inode() in fuse_iget() with a private implementation fuse_make_bad(). The private implementation fails to remove the bad inode from inode cache, so the retry loop with iget5_locked() finds the same bad inode and marks it bad forever. kmsg snip: [ ] rcu: INFO: rcu_sched self-detected stall on CPU ... [ ] ? bit_wait_io+0x50/0x50 [ ] ? fuse_init_file_inode+0x70/0x70 [ ] ? find_inode.isra.32+0x60/0xb0 [ ] ? fuse_init_file_inode+0x70/0x70 [ ] ilookup5_nowait+0x65/0x90 [ ] ? fuse_init_file_inode+0x70/0x70 [ ] ilookup5.part.36+0x2e/0x80 [ ] ? fuse_init_file_inode+0x70/0x70 [ ] ? fuse_inode_eq+0x20/0x20 [ ] iget5_locked+0x21/0x80 [ ] ? fuse_inode_eq+0x20/0x20 [ ] fuse_iget+0x96/0x1b0 Fixes: 5d069dbe8aaf ("fuse: fix bad inode") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- fs/fuse/fuse_i.h | 1 + 1 file changed, 1 insertion(+) --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -704,6 +704,7 @@ static inline u64 get_node_id(struct ino static inline void fuse_make_bad(struct inode *inode) { + remove_inode_hash(inode); set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state); }