New: kmemleak reports various leaks in "swapper/0"
https://bugzilla.kernel.org/show_bug.cgi?id=205327
Bug ID: 205327
Summary: kmemleak reports various leaks in "swapper/0"
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.4-rc4
Hardware: PPC-64
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-64
Assignee: [email protected]
Reporter: [email protected]
Regression: NoCreated attachment 285655
--> https://bugzilla.kernel.org/attachment.cgi?id=285655&action=edit
kmemleak output
kmemleak reported various leaks in "swapper/0" while I was building some stuff via distcc:
unreferenced object 0xc00000027eea64e0 (size 32):
comm "swapper/0", pid 1, jiffies 4294877673 (age 1568.254s) hex dump (first 32 bytes):
2f 5f 5f 6c 6f 63 61 6c 5f 66 69 78 75 70 73 5f /__local_fixups_
5f 00 00 00 00 ca ad c8 00 00 00 00 00 00 00 00 _...............
backtrace:
[<00000000e9188659>] .kvasprintf+0x64/0xe0
[<00000000dc0cdc16>] .kasprintf+0x2c/0x50
[<0000000000808425>] .attach_node_and_children+0x2c/0x270
[<00000000a50a500b>] .of_unittest+0x1f4/0x379c
[<00000000e51cf048>] .do_one_initcall+0x7c/0x430
[<00000000e6d8e44a>] .kernel_init_freeable+0x2d0/0x3cc
[<000000005adf1660>] .kernel_init+0x1c/0x138
[<000000006adcb060>] .ret_from_kernel_thread+0x58/0x64[...]
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
https://bugzilla.kernel.org/show_bug.cgi?id=205327
--- Comment #1 from Erhard F. ([email protected]) --- Created attachment 285659
--> https://bugzilla.kernel.org/attachment.cgi?id=285659&action=edit
5.4.0-rc4 kernel .config (PowerMac G5 7,3)
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
--- Comment #2 from Erhard F. ([email protected]) --- Created attachment 285661
--> https://bugzilla.kernel.org/attachment.cgi?id=285661&action=edit
dmesg (kernel 5.4.0-rc4, PowerMac G5 7,3)
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
Michael Ellerman ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |[email protected]--- Comment #3 from Michael Ellerman ([email protected]) --- That looks like a pretty straight forward memory leak here:
static void attach_node_and_children(struct device_node *np)
{
struct device_node *next, *dup, *child;
unsigned long flags;
const char *full_name;
full_name = kasprintf(GFP_KERNEL, "%pOF", np);
if (!strcmp(full_name, "/__local_fixups__") ||
!strcmp(full_name, "/__fixups__"))Quoted 1 line
Quoted 1 line
missing
kfree(full_name);
return;
dup = of_find_node_by_path(full_name);
kfree(full_name);
if (dup) {
update_node_properties(np, dup);
return;
}Do you want to send a patch?
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
--- Comment #4 from Erhard F. ([email protected]) --- (In reply to Michael Ellerman from comment #3)
Quoted 1 line
That looks like a pretty straight forward memory leak here:
[...]
Quoted 1 line
Do you want to send a patch?
Thanks for pointing out! Yes, in this case writing a patch is within reach of my coding skills. ;)
Have to check the procedure of how to submit a patch to the kernel first, as I have not done this yet.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
--- Comment #5 from Erhard F. ([email protected]) --- (In reply to Michael Ellerman from comment #3)
Quoted 1 line
Do you want to send a patch?
I already sent the patch to [email protected]
(https://patchwork.ozlabs.org/patch/1195212/) but don't know how to proceed further to get this patch into stable, etc.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
--- Comment #6 from Michael Ellerman ([email protected]) --- I replied with directions on what to do.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
[Bug 205327] kmemleak reports various leaks in "swapper/0"
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=205327
Erhard F. ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |CODE_FIX--- Comment #7 from Erhard F. ([email protected]) --- Fix landed in 5.4.8 and older affected LTS kernels.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.