Indicated kmemleak in msr_build_context() for Kernel 5.7.0-rc5
From: Larry Finger
Date: Mon May 18 2020 - 15:21:08 EST
On a system with an AMD FX-8320E Eight-Core Processor running kernel 5.7.0-rc5,
I am seeing the following memory leak:
localhost:~ # cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff88840ca02540 (size 64):
comm "swapper/0", pid 1, jiffies 4294892775 (age 138786.084s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 04 10 01 c0 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<0000000005004530>] msr_build_context.constprop.0+0x32/0xbe
[<00000000bb4e1265>] msr_save_cpuid_features+0x28/0x2c
[<0000000011ec0f08>] pm_check_save_msr+0x2e/0x40
[<000000000cd50945>] do_one_initcall+0x46/0x220
[<00000000fd0d2fc9>] kernel_init_freeable+0x1c6/0x23f
[<000000009f9b95ca>] kernel_init+0xa/0xfc
[<000000000a571fca>] ret_from_fork+0x22/0x40
This is a "family 0x15" AMD CPU, thus MSR saving is needed during suspending. I
believe this to be a false positive.
The indicated memory allocation has been in the kernel since v4.5.0. Should a
patch be sent to clear this false memory leak indication for systems with AMD
processors?
Larry