Thread (2 messages) 2 messages, 1 author, 2024-05-22

Re: [PATCH] tracefs: Remove unneeded buggy tracefs iput callback

flat view

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-05-22 18:05:07
Also in: lkml

On Wed, 22 May 2024 12:45:04 -0400
Steven Rostedt [off-list ref] wrote:
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The iput callback was added because the remount could call into the
eventfs code and touch the ei->entry_attrs array, which could have been
freed when an eventfs directory is freed (via a synthetic event). But the
entry_attrs was freed incorrectly and since been fixed to be freed after
the last reference of the ei is done.

The iput clears the TRACEFS_EVENT_INODE flag of the tracefs_inode
preventing it from calling the eventfs_remount() function. But the iput
can be called after the last reference to the inode is done but the
eventfs_inode still exists, causing the eventfs_remount() not to be called
on an tracefs_inode when it should be.
Testing this more, I found that the iput is still needed, as the deletion
of the eventfs inodes can happen before the inode is released.

Will produce a v2 that handles this properly.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help