Takeshi Misawa
d122ed6288
tracing: Fix memory leak in tracing_err_log_open()
...
When tracing_err_log_open() calls seq_open(), allocated memory is not freed.
kmemleak report:
unreferenced object 0xffff92c0781d1100 (size 128):
comm "tail", pid 15116, jiffies 4295163855 (age 22.704s)
hex dump (first 32 bytes):
00 f0 08 e5 c0 92 ff ff 00 10 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000000d0687d5>] kmem_cache_alloc+0x11f/0x1e0
[<000000003e3039a8>] seq_open+0x2f/0x90
[<000000008dd36b7d>] tracing_err_log_open+0x67/0x140
[<000000005a431ae2>] do_dentry_open+0x1df/0x3a0
[<00000000a2910603>] vfs_open+0x2f/0x40
[<0000000038b0a383>] path_openat+0x2e8/0x1690
[<00000000fe025bda>] do_filp_open+0x9b/0x110
[<00000000483a5091>] do_sys_open+0x1ba/0x260
[<00000000c558b5fd>] __x64_sys_openat+0x20/0x30
[<000000006881ec07>] do_syscall_64+0x5a/0x130
[<00000000571c2e94>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fix this by calling seq_release() in tracing_err_log_fops.release().
Link: http://lkml.kernel.org/r/20190628105640.GA1863@DESKTOP
Fixes: 8a062902be725 ("tracing: Add tracing error log")
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Takeshi Misawa <jeliantsurux@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-06-28 14:57:23 -04:00
..
2019-03-13 14:31:12 -06:00
2019-05-07 22:03:58 -07:00
2018-12-22 08:21:03 -05:00
2018-12-08 20:54:06 -05:00
2019-06-28 14:20:25 -04:00
2019-04-08 15:11:48 +02:00
2018-12-08 20:54:09 -05:00
2017-11-02 11:10:55 +01:00
2018-10-17 15:35:33 -04:00
2019-05-08 12:15:12 -04:00
2019-05-15 16:05:47 -07:00
2017-11-02 11:10:55 +01:00
2018-05-15 10:27:29 -07:00
2018-08-16 19:08:06 -04:00
2019-04-03 11:02:24 +02:00
2018-08-16 19:08:06 -04:00
2019-03-26 08:35:36 -04:00
2018-12-08 20:54:09 -05:00
2019-02-11 14:53:43 -05:00
2019-02-21 10:35:10 -05:00
2018-08-16 19:08:06 -04:00
2019-05-28 16:27:58 -04:00
2019-05-21 12:48:07 -04:00
2019-04-08 09:22:28 -04:00
2019-05-08 12:15:12 -04:00
2018-05-29 08:28:53 -04:00
2019-02-06 11:56:19 -05:00
2018-01-23 15:57:00 -05:00
2018-08-16 19:08:06 -04:00
2019-03-11 17:01:32 -07:00
2019-05-25 23:04:30 -04:00
2018-07-30 18:41:04 -04:00
2018-08-16 19:08:06 -04:00
2019-04-02 18:24:07 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-14 16:28:42 -04:00
2018-08-16 19:08:06 -04:00
2019-02-13 08:16:40 +01:00
2018-09-26 12:21:00 +03:00
2019-05-08 12:15:11 -04:00
2019-05-08 12:15:12 -04:00
2019-05-08 12:15:11 -04:00
2017-11-02 11:10:55 +01:00
2019-02-20 13:51:06 -05:00
2018-01-23 15:57:29 -05:00
2019-04-21 19:46:56 -04:00
2018-08-16 19:08:06 -04:00
2019-04-29 12:37:56 +02:00
2017-11-02 11:10:55 +01:00
2018-08-16 19:08:06 -04:00
2019-04-05 09:26:43 -04:00
2019-06-14 17:00:36 -04:00
2019-06-28 14:57:23 -04:00
2019-05-25 23:04:30 -04:00
2018-08-16 19:08:06 -04:00
2018-08-16 19:08:06 -04:00