[Bug 205327] kmemleak reports various leaks in "swapper/0"

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Tue Oct 29 22:27:47 AEDT 2019


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

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

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

--- Comment #3 from Michael Ellerman (michael at 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.


More information about the Linuxppc-dev mailing list