Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3563310pxb; Mon, 24 Jan 2022 12:17:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPy0RmK0V2zBpd9p76XsXxuB96JCaxtS9HFg7H2g86hAVD2rrlsjC/kjTl+91eTduG6XJl X-Received: by 2002:a17:90a:1b43:: with SMTP id q61mr4275pjq.183.1643055473152; Mon, 24 Jan 2022 12:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055473; cv=none; d=google.com; s=arc-20160816; b=D2+GW3ljwm2HPlre0TWqKqAD8HduQdREQN8nf8wtSWMsugL3BT/EgdedeG7FtJdier CsI0udd3OhTdFhVE7U4/6s7XLaNuGx9VtqcRJ7xWxZp1Z1btiRpT7hc9timEyD5gOmF3 jGf1mdryXNJyL6lEPgAEMXfQU8e9bhbMCx8W/VDxPduzZZHl0f6bPxzbd4DMpqzTOb0g v7nZ8zPhLHttuL/hMBL8FhVO2S51Bed715VT9Wy90g6v5nzgzKjn6VK9Af/WiFFMqDm8 4mh0NHjA7eJskWXAospcSaNuyuVocqnlNXCl3mYMqYNMVy8MN/jtgOvo0ztM4pvhaTGg /hfQ== 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=ueeu99bcq161/Nt4S9pcXpy0pZbgz34vjOBJlq8N2rY=; b=FAloFY8vXut9eju5mMoP30QupdtbWfIqMn+dGV2U74XCvddAXY5+JxtHqbu3muiWOE uq+jxpRTj43UARL7VPGoRm2SzoDJjeQ2zFjqFFRyYBHicO4h5bpue9E7JmhgeqTCd6Nf USqY6nVpW3PsOnT+moz3trTpKcB0VMJEP2NYma9kiE6QPO2ireW6K3np0v8S7hkFFSG7 8svO+FQfr24aBfH+OwTPbdYMrpXraU9o9L8wPukcTXXfQWgmnnLkrlPd8FWLH31p4XvB P40IwE/zqlQT75AAFPMnmSnry/x+7o7qppZcl0UWFfdrLzsHkh6snC2iBJfXCRG8PO7k FINw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZQghJyv3; 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 d5si13177649pgq.736.2022.01.24.12.17.40; Mon, 24 Jan 2022 12:17:53 -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=ZQghJyv3; 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 S1349370AbiAXTUi (ORCPT + 99 others); Mon, 24 Jan 2022 14:20:38 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:37974 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345368AbiAXTMK (ORCPT ); Mon, 24 Jan 2022 14:12:10 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 07733B81215; Mon, 24 Jan 2022 19:12:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2419BC340E5; Mon, 24 Jan 2022 19:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051526; bh=LNtD9UZWvbmDOw7paLtYgM/qBbS/NqI14rCQ7TsFR8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZQghJyv3b6ziiak7yNrofbh4oPEmZdjjW3rp94Cun0KCeu/YFalhoQxvI32D9Z/G7 nY7uIRWlzcFvCipX4xrosNgnPNrZ3v4e4R253OUHEsqhDJNnhh3iZJLsQWgkzcBMrx neRRqv0Y4eaWLQcFn958ZjTE63lFfglng63yvleY= 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.14 183/186] fuse: fix live lock in fuse_iget() Date: Mon, 24 Jan 2022 19:44:18 +0100 Message-Id: <20220124183942.988636950@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 @@ -691,6 +691,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); }