All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 205327] New: kmemleak reports various leaks in "swapper/0"
@ 2019-10-26 19:30 bugzilla-daemon
  2019-10-26 19:31 ` [Bug 205327] " bugzilla-daemon
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-10-26 19:30 UTC (permalink / raw)
  To: linuxppc-dev

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: platform_ppc-64@kernel-bugs.osdl.org
          Reporter: erhard_f@mailbox.org
        Regression: No

Created 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
[...]

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
@ 2019-10-26 19:31 ` bugzilla-daemon
  2019-10-26 19:50 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-10-26 19:31 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

--- Comment #1 from Erhard F. (erhard_f@mailbox.org) ---
Created attachment 285659
  --> https://bugzilla.kernel.org/attachment.cgi?id=285659&action=edit
5.4.0-rc4 kernel .config (PowerMac G5 7,3)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
  2019-10-26 19:31 ` [Bug 205327] " bugzilla-daemon
@ 2019-10-26 19:50 ` bugzilla-daemon
  2019-10-29 11:27 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-10-26 19:50 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

--- Comment #2 from Erhard F. (erhard_f@mailbox.org) ---
Created attachment 285661
  --> https://bugzilla.kernel.org/attachment.cgi?id=285661&action=edit
dmesg (kernel 5.4.0-rc4, PowerMac G5 7,3)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
  2019-10-26 19:31 ` [Bug 205327] " bugzilla-daemon
  2019-10-26 19:50 ` bugzilla-daemon
@ 2019-10-29 11:27 ` bugzilla-daemon
  2019-10-31  1:22 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-10-29 11:27 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

Michael Ellerman (michael@ellerman.id.au) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |michael@ellerman.id.au

--- Comment #3 from Michael Ellerman (michael@ellerman.id.au) ---
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__"))

>> 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?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
                   ` (2 preceding siblings ...)
  2019-10-29 11:27 ` bugzilla-daemon
@ 2019-10-31  1:22 ` bugzilla-daemon
  2019-11-18 19:17 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-10-31  1:22 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

--- Comment #4 from Erhard F. (erhard_f@mailbox.org) ---
(In reply to Michael Ellerman from comment #3)
> That looks like a pretty straight forward memory leak here:
[...]
> 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.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
                   ` (3 preceding siblings ...)
  2019-10-31  1:22 ` bugzilla-daemon
@ 2019-11-18 19:17 ` bugzilla-daemon
  2019-11-19  1:26 ` bugzilla-daemon
  2020-01-05 12:46 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-11-18 19:17 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

--- Comment #5 from Erhard F. (erhard_f@mailbox.org) ---
(In reply to Michael Ellerman from comment #3)
> Do you want to send a patch?
I already sent the patch to linuxppc-dev@lists.ozlabs.org
(https://patchwork.ozlabs.org/patch/1195212/) but don't know how to proceed
further to get this patch into stable, etc.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
                   ` (4 preceding siblings ...)
  2019-11-18 19:17 ` bugzilla-daemon
@ 2019-11-19  1:26 ` bugzilla-daemon
  2020-01-05 12:46 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2019-11-19  1:26 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

--- Comment #6 from Michael Ellerman (michael@ellerman.id.au) ---
I replied with directions on what to do.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug 205327] kmemleak reports various leaks in "swapper/0"
  2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
                   ` (5 preceding siblings ...)
  2019-11-19  1:26 ` bugzilla-daemon
@ 2020-01-05 12:46 ` bugzilla-daemon
  6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon @ 2020-01-05 12:46 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=205327

Erhard F. (erhard_f@mailbox.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #7 from Erhard F. (erhard_f@mailbox.org) ---
Fix landed in 5.4.8 and older affected LTS kernels.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-05 12:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 19:30 [Bug 205327] New: kmemleak reports various leaks in "swapper/0" bugzilla-daemon
2019-10-26 19:31 ` [Bug 205327] " bugzilla-daemon
2019-10-26 19:50 ` bugzilla-daemon
2019-10-29 11:27 ` bugzilla-daemon
2019-10-31  1:22 ` bugzilla-daemon
2019-11-18 19:17 ` bugzilla-daemon
2019-11-19  1:26 ` bugzilla-daemon
2020-01-05 12:46 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.