Shang XiaoJing
a4527fef9a
tracing: Fix memory leak in test_gen_synth_cmd() and test_empty_synth_event()
test_gen_synth_cmd() only free buf in fail path, hence buf will leak
when there is no failure. Add kfree(buf) to prevent the memleak. The
same reason and solution in test_empty_synth_event().
unreferenced object 0xffff8881127de000 (size 2048):
comm "modprobe", pid 247, jiffies 4294972316 (age 78.756s)
hex dump (first 32 bytes):
20 67 65 6e 5f 73 79 6e 74 68 5f 74 65 73 74 20 gen_synth_test
20 70 69 64 5f 74 20 6e 65 78 74 5f 70 69 64 5f pid_t next_pid_
backtrace:
[<000000004254801a>] kmalloc_trace+0x26/0x100
[<0000000039eb1cf5>] 0xffffffffa00083cd
[<000000000e8c3bc8>] 0xffffffffa00086ba
[<00000000c293d1ea>] do_one_initcall+0xdb/0x480
[<00000000aa189e6d>] do_init_module+0x1cf/0x680
[<00000000d513222b>] load_module+0x6a50/0x70a0
[<000000001fd4d529>] __do_sys_finit_module+0x12f/0x1c0
[<00000000b36c4c0f>] do_syscall_64+0x3f/0x90
[<00000000bbf20cf3>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
unreferenced object 0xffff8881127df000 (size 2048):
comm "modprobe", pid 247, jiffies 4294972324 (age 78.728s)
hex dump (first 32 bytes):
20 65 6d 70 74 79 5f 73 79 6e 74 68 5f 74 65 73 empty_synth_tes
74 20 20 70 69 64 5f 74 20 6e 65 78 74 5f 70 69 t pid_t next_pi
backtrace:
[<000000004254801a>] kmalloc_trace+0x26/0x100
[<00000000d4db9a3d>] 0xffffffffa0008071
[<00000000c31354a5>] 0xffffffffa00086ce
[<00000000c293d1ea>] do_one_initcall+0xdb/0x480
[<00000000aa189e6d>] do_init_module+0x1cf/0x680
[<00000000d513222b>] load_module+0x6a50/0x70a0
[<000000001fd4d529>] __do_sys_finit_module+0x12f/0x1c0
[<00000000b36c4c0f>] do_syscall_64+0x3f/0x90
[<00000000bbf20cf3>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
Link: https://lkml.kernel.org/r/20221117012346.22647-2-shangxiaojing@huawei.com
Cc: <mhiramat@kernel.org>
Cc: <zanussi@kernel.org>
Cc: <fengguang.wu@intel.com>
Cc: stable@vger.kernel.org
Fixes: 9fe41efaca08 ("tracing: Add synth event generation test module")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-11-17 17:51:38 -05:00
..
2022-11-04 00:24:12 +01:00
2022-10-17 18:52:43 -07:00
2022-09-28 09:02:20 +02:00
2022-09-26 19:46:18 -07:00
2022-10-10 17:53:04 -07:00
2022-10-03 14:03:25 -07:00
2022-11-02 12:22:05 +01:00
2022-09-07 21:53:50 +02:00
2022-10-20 21:27:22 -07:00
2022-09-19 15:08:38 +02:00
2022-10-11 17:42:58 -06:00
2022-10-10 11:36:19 -07:00
2022-10-11 17:42:55 -06:00
2022-10-10 12:16:19 -07:00
2022-10-25 14:53:19 +02:00
2022-09-29 15:20:52 +02:00
2022-10-20 15:34:49 -07:00
2022-10-17 16:41:25 +02:00
2022-10-11 17:42:55 -06:00
2022-11-17 17:51:38 -05:00
2022-09-26 19:46:22 -07:00
2022-02-03 11:20:34 -08:00
2022-08-22 18:50:06 -04:00
2022-04-25 14:37:28 +02:00
2022-09-01 17:39:30 -04:00
2022-08-29 19:47:03 -04:00
2022-09-07 11:30:15 -04:00
2022-01-11 13:08:21 -08:00
2022-10-04 11:05:43 -07:00
2022-09-26 19:46:09 -07:00
2022-03-09 10:32:06 -08:00
2022-09-26 10:13:13 -07:00
2022-07-05 13:33:00 -07:00
2022-07-05 13:32:59 -07:00
2022-05-23 17:51:12 -07:00
2022-08-28 14:02:44 -07:00
2022-03-15 10:32:44 +01:00
2022-09-26 19:46:07 -07:00
2022-10-12 11:00:22 -07:00
2022-07-05 13:32:59 -07:00
2022-09-11 21:55:11 -07:00
2022-10-12 11:00:22 -07:00
2022-09-07 21:53:50 +02:00
2022-09-29 04:40:15 +09:00
2022-07-15 18:21:49 +00:00
2022-09-30 16:50:39 +02:00
2022-04-15 14:49:55 -07:00
2022-06-24 09:48:55 +02:00
2022-07-17 17:31:39 -07:00
2022-10-03 17:11:07 -07:00
2022-03-31 10:36:55 +02:00
2022-10-03 14:03:23 -07:00
2022-09-11 21:55:08 -07:00
2022-09-11 21:55:06 -07:00
2022-09-11 21:55:06 -07:00
2022-09-11 21:55:06 -07:00
2022-11-04 08:49:31 +09:00
2022-09-11 21:55:06 -07:00
2022-10-09 16:01:59 -07:00
2022-09-11 21:55:12 -07:00
2022-10-03 14:03:20 -07:00
2022-05-19 19:30:30 +02:00
2022-09-13 10:38:43 -07:00
2022-01-31 11:21:46 +11:00
2022-09-01 16:55:35 +02:00
2021-12-28 11:26:18 +01:00
2022-04-29 14:38:00 -07:00
2022-06-29 13:07:16 +02:00
2022-09-11 21:55:12 -07:00
2022-09-07 21:53:50 +02:00
2022-10-04 15:59:36 +02:00
2022-10-03 14:21:43 -07:00
2022-07-21 17:19:25 -07:00
2022-08-01 15:21:42 +02:00
2022-04-11 17:07:29 -07:00
2022-03-24 19:06:48 -07:00
2022-05-03 14:11:58 -07:00
2022-10-10 09:10:28 -07:00
2022-10-10 12:49:34 -07:00
2022-09-11 21:55:10 -07:00
2022-07-05 13:32:59 -07:00
2022-05-08 01:33:09 -07:00
2022-02-25 09:36:06 +01:00
2022-04-05 09:59:38 +02:00
2022-04-05 09:59:38 +02:00
2022-05-24 11:11:13 -07:00
2022-08-20 15:17:45 -07:00
2022-10-10 10:41:21 -07:00
2022-09-08 16:56:45 -07:00
2022-10-10 17:53:04 -07:00
2022-09-11 21:55:10 -07:00
2022-08-29 12:47:15 +01:00
2022-02-01 17:24:39 -08:00
2022-09-26 13:01:18 -04:00
2022-04-29 14:38:03 -07:00
2022-05-18 18:24:57 -05:00
2022-09-07 21:53:50 +02:00
2022-10-09 16:24:05 -07:00
2022-05-19 23:25:47 -04:00
2022-10-23 12:01:01 -07:00
2022-08-02 19:24:24 -07:00
2022-06-23 18:41:40 +02:00
2022-08-06 16:38:17 -07:00
2022-10-03 17:11:07 -07:00