Message ID | 20240206120951.255146556@rostedt.homelinux.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1499237dyb; Tue, 6 Feb 2024 04:23:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/qgn8JVidykmyrSbVUKkqolkvB0X/2klz5J2RRuqVG08H5NbBg1e9jZ5nRz+0pAVv5YWJ X-Received: by 2002:a17:907:3fa4:b0:a38:2bef:611e with SMTP id hr36-20020a1709073fa400b00a382bef611emr1297707ejc.49.1707222204078; Tue, 06 Feb 2024 04:23:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707222204; cv=pass; d=google.com; s=arc-20160816; b=zYCNNHoMMqfPlG61cHWci6/KZrX34kQHWsE2BVX5ySxKWzfTxeMXVI7KOjVgm7LUYo kAQdHGn/IiSHxfSBJ7cScePVPuvguZJsEUpBpuTUj4oTTCbRzQ2Pv+5UQ3aFR+CQd/9c hHqSBm5gvVeCEmFyh8puMjRJG/7BXJZgwXZED3BqL8HMVdnBk+PqRJKjdbYCsOeY3ngC zoY6ary0zfDawBdj8EROCBfy+AyELkXs5la2r5qEUKFsBbtEP9j4ufyb95NuiMcGwd8h zKogVY1QXenbGSoOl7U+tUkFbZR7WIBHO0Aet3TmfeIE8GZMEjaAwxfFTXzPRRjTf+z3 pwIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=Lp0RKTj6GGbabZSHcEFR+RYAu/yyivVY0LVkvEguOj0=; fh=SpUiXBZymF7zCTwH888pHR9dS01LnmMhkiGrnqP31cY=; b=SgBudT9U3/4BpLTenCXLarWOj31vOx967tNQLQwE0q7UiIFdFaI9pvBX+1XaGEBij7 b4dF5pSx4UcAMrvubcbAdwOf+vtV02mFbj7gjO2m0s0Y3R4EpKzwHiyUGz4WcIZNnzKl 9nXPt3+hiecPiY7GUqfKlasfhcD+LklFH9Hi+AW7m4Kug8PLmzqfJRB8+Ty9i8RkHAKm k1CEE7VHCtxnG8gh2po3+sEE9GgiupECbxhzH6kwHMUANdt8HDGav/WEivcME563lWYq PPeE6BZNR/GG5OLK9OQry4mzlAuFi92n8GDyWR05YRvCVyANrOdvc3y0u+bnyJKlIHSW Q1mA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWmQXBwsfnjoke0D1MEAt5HAcLu2wifygjaEqFmAFC7QbyRJuPMCLAHiwlbZ8fmh6aIyCNe36bmzcI726TMkmuUl7swlA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lh9-20020a170906f8c900b00a35a576b259si986833ejb.922.2024.02.06.04.23.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 04:23:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54906-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A37D21F220D0 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 12:23:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C2FA133427; Tue, 6 Feb 2024 12:09:33 +0000 (UTC) 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 51A991386BD; Tue, 6 Feb 2024 12:09:23 +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=1707221363; cv=none; b=qnRT6Iobxg1lbn32nGnIVCSlBgDHPmaCXBOzUTf+WJ0AqeylxdCB/M0z8g0uFnhqtjKkxaS6ugTjYLqHOIOsfSQZy5Aja20o6xJT/rBOpRZgyiQGEAW81rxyMC+0hn52V7rRxcDOQdVnYQzCxkkYAHjksK/cf+ODjLo33lAH88A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707221363; c=relaxed/simple; bh=SD2Ctw8XfUaOuPz+cDqcSSEYSx7EhLuOjt5hoKj8zpc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=qeEQq3REkzClJaKMN7lYX2/Var1q1m1BEBV8mSMuMf9KRKi1yEtq2IwOMdqonFbRn3iSLD75NY8M/YABf221Q1VJ3QTaRG7/UOwsdoZ38yjzwsxvOnnhe/D2+ClKHs7HCP+13W/+oPt1RZBKw3LLDkgqyEfi08UDRaytnzChvtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6A4BC43394; Tue, 6 Feb 2024 12:09:22 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from <rostedt@rostedt.homelinux.com>) id 1rXKGt-00000006bGL-1eGZ; Tue, 06 Feb 2024 07:09:51 -0500 Message-ID: <20240206120951.255146556@rostedt.homelinux.com> User-Agent: quilt/0.67 Date: Tue, 06 Feb 2024 07:09:35 -0500 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Beau Belgrave <beaub@linux.microsoft.com> Subject: [v6.6][PATCH 30/57] eventfs: Fix events beyond NAME_MAX blocking tasks References: <20240206120905.570408983@rostedt.homelinux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790152230209842762 X-GMAIL-MSGID: 1790152230209842762 |
Series |
eventfs: Linus's updates for 6.6
|
|
Commit Message
Steven Rostedt
Feb. 6, 2024, 12:09 p.m. UTC
From: Beau Belgrave <beaub@linux.microsoft.com> Eventfs uses simple_lookup(), however, it will fail if the name of the entry is beyond NAME_MAX length. When this error is encountered, eventfs still tries to create dentries instead of skipping the dentry creation. When the dentry is attempted to be created in this state d_wait_lookup() will loop forever, waiting for the lookup to be removed. Fix eventfs to return the error in simple_lookup() back to the caller instead of continuing to try to create the dentry. Link: https://lore.kernel.org/linux-trace-kernel/20231210213534.497-1-beaub@linux.microsoft.com Fixes: 63940449555e ("eventfs: Implement eventfs lookup, read, open functions") Link: https://lore.kernel.org/linux-trace-kernel/20231208183601.GA46-beaub@linux.microsoft.com/ Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> (cherry picked from commit 5eaf7f0589c0d88178f0fbeebe0e0b7108258707) --- fs/tracefs/event_inode.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 0b90869fd805..43e237864a42 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -546,6 +546,8 @@ static struct dentry *eventfs_root_lookup(struct inode *dir, if (strcmp(ei_child->name, name) != 0) continue; ret = simple_lookup(dir, dentry, flags); + if (IS_ERR(ret)) + goto out; create_dir_dentry(ei, ei_child, ei_dentry, true); created = true; break; @@ -568,6 +570,8 @@ static struct dentry *eventfs_root_lookup(struct inode *dir, if (r <= 0) continue; ret = simple_lookup(dir, dentry, flags); + if (IS_ERR(ret)) + goto out; create_file_dentry(ei, i, ei_dentry, name, mode, cdata, fops, true); break;