]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
eventfs: Do not treat events directory different than other directories
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 2 May 2024 20:08:26 +0000 (16:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:37 +0000 (12:02 +0200)
commitcc6f5aa151b3bb587e0d2b5673b0d981b0fe9ea2
tree23d44e2ea76616d83d235cedfa00bfd3b0fe9dbe
parent0c56915c042a3aad60d23791d5dfae03620979d5
eventfs: Do not treat events directory different than other directories

commit 22e61e15af731dbe46704c775d2335e56fcef4e9 upstream.

Treat the events directory the same as other directories when it comes to
permissions. The events directory was considered different because it's
dentry is persistent, whereas the other directory dentries are created
when accessed. But the way tracefs now does its ownership by using the
root dentry's permissions as the default permissions, the events directory
can get out of sync when a remount is performed setting the group and user
permissions.

Remove the special case for the events directory on setting the
attributes. This allows the updates caused by remount to work properly as
well as simplifies the code.

Link: https://lore.kernel.org/linux-trace-kernel/20240502200906.002923579@goodmis.org
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Fixes: 8186fff7ab649 ("tracefs/eventfs: Use root and instance inodes as default ownership")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/tracefs/event_inode.c