Steven Rostedt (Google)
d508ee2dd5
tracefs/eventfs: Free top level files on removal
...
When an instance is removed, the top level files of the eventfs directory
are not cleaned up. Call the eventfs_remove() on each of the entries to
free them.
This was found via kmemleak:
unreferenced object 0xffff8881047c1280 (size 96):
comm "mkdir", pid 924, jiffies 4294906489 (age 2013.077s)
hex dump (first 32 bytes):
18 31 ed 03 81 88 ff ff 00 31 09 24 81 88 ff ff .1.......1.$....
00 00 00 00 00 00 00 00 98 19 7c 04 81 88 ff ff ..........|.....
backtrace:
[<000000000fa46b4d>] kmalloc_trace+0x2a/0xa0
[<00000000e729cd0c>] eventfs_prepare_ef.constprop.0+0x3a/0x160
[<000000009032e6a8>] eventfs_add_events_file+0xa0/0x160
[<00000000fe968442>] create_event_toplevel_files+0x6f/0x130
[<00000000e364d173>] event_trace_add_tracer+0x14/0x140
[<00000000411840fa>] trace_array_create_dir+0x52/0xf0
[<00000000967804fa>] trace_array_create+0x208/0x370
[<00000000da505565>] instance_mkdir+0x6b/0xb0
[<00000000dc1215af>] tracefs_syscall_mkdir+0x5b/0x90
[<00000000a8aca289>] vfs_mkdir+0x272/0x380
[<000000007709b242>] do_mkdirat+0xfc/0x1d0
[<00000000c0b6d219>] __x64_sys_mkdir+0x78/0xa0
[<0000000097b5dd4b>] do_syscall_64+0x3f/0x90
[<00000000a3f00cfa>] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
unreferenced object 0xffff888103ed3118 (size 8):
comm "mkdir", pid 924, jiffies 4294906489 (age 2013.077s)
hex dump (first 8 bytes):
65 6e 61 62 6c 65 00 00 enable..
backtrace:
[<0000000010f75127>] __kmalloc_node_track_caller+0x51/0x160
[<000000004b3eca91>] kstrdup+0x34/0x60
[<0000000050074d7a>] eventfs_prepare_ef.constprop.0+0x53/0x160
[<000000009032e6a8>] eventfs_add_events_file+0xa0/0x160
[<00000000fe968442>] create_event_toplevel_files+0x6f/0x130
[<00000000e364d173>] event_trace_add_tracer+0x14/0x140
[<00000000411840fa>] trace_array_create_dir+0x52/0xf0
[<00000000967804fa>] trace_array_create+0x208/0x370
[<00000000da505565>] instance_mkdir+0x6b/0xb0
[<00000000dc1215af>] tracefs_syscall_mkdir+0x5b/0x90
[<00000000a8aca289>] vfs_mkdir+0x272/0x380
[<000000007709b242>] do_mkdirat+0xfc/0x1d0
[<00000000c0b6d219>] __x64_sys_mkdir+0x78/0xa0
[<0000000097b5dd4b>] do_syscall_64+0x3f/0x90
[<00000000a3f00cfa>] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Link: https://lore.kernel.org/linux-trace-kernel/20230907175859.6fedbaa2@gandalf.local.home
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ajay Kaher <akaher@vmware.com>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: 5bdcd5f5331a2 eventfs: ("Implement removal of meta data from eventfs")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-09-08 23:12:06 -04:00
..
2023-08-29 14:25:26 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 14:25:26 -07:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 14:25:26 -07:00
2023-08-29 14:25:26 -07:00
2023-08-29 14:25:26 -07:00
2023-08-28 09:31:32 -07:00
2023-07-13 10:28:05 +02:00
2023-08-28 11:04:18 -07:00
2023-09-01 09:53:54 -07:00
2023-08-28 10:17:14 -07:00
2023-08-25 10:31:39 -05:00
2023-08-28 10:17:14 -07:00
2023-07-13 10:28:06 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 14:25:26 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 17:45:22 -04:00
2023-08-30 12:10:50 -07:00
2023-08-31 15:18:15 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 14:25:26 -07:00
2023-08-31 15:02:12 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:00 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 14:25:26 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-31 15:18:15 -07:00
2023-07-24 10:30:01 +02:00
2023-08-31 15:25:01 -07:00
2023-09-01 09:43:18 -07:00
2023-08-29 17:45:22 -04:00
2023-08-29 20:21:42 -07:00
2023-08-31 15:36:41 -07:00
2023-08-31 15:32:18 -07:00
2023-08-29 20:21:42 -07:00
2023-08-30 08:55:52 -05:00
2023-07-10 14:36:12 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-31 15:18:15 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:03 +02:00
2023-08-11 09:04:57 +02:00
2023-08-30 11:54:09 -07:00
2023-08-31 12:20:12 -07:00
2023-08-28 12:36:04 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-30 12:10:50 -07:00
2023-07-24 10:30:04 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-08-31 15:28:26 -07:00
2023-07-24 10:30:05 +02:00
2023-08-29 20:21:42 -07:00
2023-09-08 23:12:06 -04:00
2023-08-11 09:04:57 +02:00
2023-08-30 12:10:50 -07:00
2023-08-29 20:21:42 -07:00
2023-08-28 09:31:32 -07:00
2023-08-20 10:33:43 -07:00
2023-08-30 12:34:12 -07:00
2023-08-28 11:59:52 -07:00
2023-08-31 12:20:12 -07:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2023-08-23 14:17:42 -07:00
2023-06-28 20:35:21 -07:00
2023-07-13 10:28:04 +02:00
2023-08-29 20:21:42 -07:00
2023-06-26 09:50:21 -07:00
2023-08-24 16:20:30 -07:00
2023-08-19 13:41:11 +02:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2023-07-26 14:56:07 +02:00
2023-08-29 14:53:51 -07:00
2023-07-10 14:36:11 +02:00
2023-08-08 19:36:51 +02:00
2023-08-28 10:17:14 -07:00
2023-08-28 10:17:14 -07:00
2023-08-21 13:46:25 -07:00
2023-08-21 14:36:57 +02:00
2023-08-14 18:48:02 +02:00
2023-08-28 11:04:18 -07:00
2023-08-29 20:21:42 -07:00
2023-08-28 11:04:18 -07:00
2023-08-29 20:21:42 -07:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2023-08-31 15:18:15 -07:00
2023-08-31 15:32:18 -07:00
2023-08-02 09:13:09 -06:00
2023-08-19 12:12:12 +02:00
2023-06-26 10:27:04 -07:00
2023-07-13 10:28:04 +02:00
2023-08-28 11:25:27 -07:00
2023-08-28 10:17:14 -07:00
2023-07-13 10:28:04 +02:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2023-08-29 14:25:26 -07:00
2023-07-13 10:28:04 +02:00
2023-08-11 09:04:57 +02:00
2023-08-31 12:47:15 +02:00
2023-08-24 16:20:27 -07:00
2023-08-22 10:57:46 +02:00