Jim Cromie
dcb8cbb58a
kmemleak-test: drop __init to get better backtrace
...
Drop the __init on kmemleak_test_init(). With it, the storage is
reclaimed, but then the symbol isn't available for "%pS" rendering,
and the backtrace gets a bare pointer where the actual leak happened.
unreferenced object 0xffff88800a2b0800 (size 1024):
comm "modprobe", pid 413, jiffies 4294953430
hex dump (first 32 bytes):
73 02 00 00 75 01 00 68 02 00 00 01 00 00 00 04 s...u..h........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000fabad728>] kmalloc_trace+0x26/0x90
[<00000000ef738764>] 0xffffffffc02350a2
[<00000000004e5795>] do_one_initcall+0x43/0x210
[<00000000d768905e>] do_init_module+0x4a/0x210
[<0000000087135ab5>] __do_sys_finit_module+0x93/0xf0
[<000000004fcb1fa2>] do_syscall_64+0x34/0x80
[<00000000c73c8d9d>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
with __init gone, that trace entry renders like:
[<00000000ef738764>] kmemleak_test_init+<offset>/<size>
Link: https://lkml.kernel.org/r/20230525174356.69711-1-jim.cromie@gmail.com
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-06-09 16:25:40 -07:00
..
2023-04-20 14:20:51 +02:00
2021-05-02 00:43:35 +09:00
2021-05-02 00:43:35 +09:00
2023-05-16 19:44:05 +02:00
2021-05-07 00:26:34 -07:00
2021-05-02 00:43:35 +09:00
2021-11-26 11:34:07 -07:00
2021-11-07 11:19:24 -08:00
2023-03-28 18:52:22 -04:00
2023-05-04 12:40:16 -07:00
2022-11-21 22:11:52 +01:00
2021-05-02 00:43:35 +09:00
2020-04-07 10:43:44 -07:00
2021-07-27 17:05:06 +01:00
2021-10-13 14:36:48 +02:00
2023-06-09 16:25:40 -07:00
2023-02-08 13:34:41 +01:00
2023-02-25 22:12:17 +08:00
2022-11-07 20:49:50 +01:00
2022-03-23 13:51:11 +01:00
2021-08-01 09:54:22 +02:00
2021-09-14 11:11:20 +02:00
2021-05-02 00:43:35 +09:00
2022-11-22 13:23:48 +01:00
2022-08-29 17:33:01 -05:00
2023-04-10 05:05:43 +02:00
2022-02-10 19:09:12 -08:00
2021-05-02 00:43:35 +09:00
2022-12-14 11:17:55 -05:00
2020-08-10 01:32:59 +09:00
2023-03-29 06:52:09 -04:00
2022-06-10 14:51:36 +02:00
2023-04-27 11:53:57 -07:00
2021-05-02 00:43:35 +09:00
2021-05-02 00:43:35 +09:00
2021-05-02 00:43:35 +09:00
2023-04-27 19:42:02 -07:00
2023-04-18 16:29:47 -07:00