diff options
author | Steven Rostedt (Google) <[email protected]> | 2024-01-31 13:49:19 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2024-01-31 14:15:47 -0500 |
commit | d81786f53aec14fd4d56263145a0635afbc64617 (patch) | |
tree | 3a8e0d8fde941c440ec21ce60e6e4319dbc1b583 /tools/perf/util/trace-event-scripting.c | |
parent | 66bbea9ed6446b8471d365a22734dc00556c4785 (diff) |
tracefs: Zero out the tracefs_inode when allocating it
eventfs uses the tracefs_inode and assumes that it's already initialized
to zero. That is, it doesn't set fields to zero (like ti->private) after
getting its tracefs_inode. This causes bugs due to stale values.
Just initialize the entire structure to zero on allocation so there isn't
any more surprises.
This is a partial fix to access to ti->private. The assignment still needs
to be made before the dentry is instantiated.
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: [email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Ajay Kaher <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions