From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Al Viro <viro@zeniv.linux.org.uk>,
stable@vger.kernel.org, Mathias Krause <minipli@grsecurity.net>
Subject: [for-linus][PATCH 3/9] tracefs: Fix inode allocation
Date: Thu, 08 Aug 2024 10:20:40 -0400 [thread overview]
Message-ID: <20240808142123.905578907@goodmis.org> (raw)
In-Reply-To: 20240808142037.495820579@goodmis.org
From: Mathias Krause <minipli@grsecurity.net>
The leading comment above alloc_inode_sb() is pretty explicit about it:
/*
* This must be used for allocating filesystems specific inodes to set
* up the inode reclaim context correctly.
*/
Switch tracefs over to alloc_inode_sb() to make sure inodes are properly
linked.
Cc: Ajay Kaher <ajay.kaher@broadcom.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20240807115143.45927-2-minipli@grsecurity.net
Fixes: ba37ff75e04b ("eventfs: Implement tracefs_inode_cache")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
fs/tracefs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 1028ab6d9a74..21a7e51fc3c1 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -42,7 +42,7 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb)
struct tracefs_inode *ti;
unsigned long flags;
- ti = kmem_cache_alloc(tracefs_inode_cachep, GFP_KERNEL);
+ ti = alloc_inode_sb(sb, tracefs_inode_cachep, GFP_KERNEL);
if (!ti)
return NULL;
--
2.43.0
next prev parent reply other threads:[~2024-08-08 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 14:20 [for-linus][PATCH 0/9] tracing: Fixes and cleanups for v6.11 Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 1/9] tracing: Have format file honor EVENT_FILE_FL_FREED Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 2/9] tracing: Use refcount for trace_event_file reference counter Steven Rostedt
2024-08-08 14:20 ` Steven Rostedt [this message]
2024-08-08 14:20 ` [for-linus][PATCH 4/9] eventfs: Dont return NULL in eventfs_create_dir() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 5/9] eventfs: Use SRCU for freeing eventfs_inodes Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 6/9] function_graph: Fix the ret_stack used by ftrace_graph_ret_addr() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 7/9] tracing: Fix overflow in get_free_elt() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 8/9] ring-buffer: Remove unused function ring_buffer_nr_pages() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 9/9] tracefs: Use generic inode RCU for synchronizing freeing Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240808142123.905578907@goodmis.org \
--to=rostedt@goodmis.org \
--cc=ajay.kaher@broadcom.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=minipli@grsecurity.net \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox