lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKKbWA5GkC7M9gm_HRN-4=neJKNH4JGRj1aaNsHyR7Ar54dS0A@mail.gmail.com>
Date:   Mon, 4 Mar 2019 17:39:28 +0200
From:   Avi Fishman <avifishman70@...il.com>
To:     Wen Yang <wen.yang99@....com.cn>
Cc:     liviu.dudau@....com, sudeep.holla@....com,
        lorenzo.pieralisi@....com, Russell King <linux@...linux.org.uk>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        kgene@...nel.org, krzk@...nel.org,
        linux-samsung-soc@...r.kernel.org, michal.simek@...inx.com,
        afaerber@...e.de, manivannan.sadhasivam@...aro.org,
        dinguyen@...nel.org, heiko@...ech.de,
        linux-rockchip@...ts.infradead.org,
        Florian Fainelli <f.fainelli@...il.com>, rjui@...adcom.com,
        sbranden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
        linus.walleij@...aro.org, Tomer Maimon <tmaimon77@...il.com>,
        Patrick Venture <venture@...gle.com>,
        Nancy Yuen <yuenn@...gle.com>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        OpenBMC Maillist <openbmc@...ts.ozlabs.org>,
        xuwei5@...ilicon.com, maxime.ripard@...tlin.com, wens@...e.org,
        catalin.marinas@....com, will.deacon@....com, horms@...ge.net.au,
        magnus.damm@...il.com, linux-renesas-soc@...r.kernel.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        fabio.estevam@....com, linux-imx@....com, wang.yi59@....com.cn
Subject: Re: [PATCH 06/15] arm: npcm: fix a leaked reference by addingmissing of_node_put

Reviewed-by: Avi Fishman <avifishman70@...il.com>

Thanks

On Fri, Mar 1, 2019 at 10:57 AM Wen Yang <wen.yang99@....com.cn> wrote:
>
> The call to of_get_next_child returns a node pointer with refcount
> incremented thus it must be explicitly decremented after the last
> usage.
>
> Detected by coccinelle with the following warnings:
> ./arch/arm/mach-npcm/platsmp.c:52:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 31, but without a corresponding object release within this function.
> ./arch/arm/mach-npcm/platsmp.c:68:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 60, but without a corresponding object release within this function.
>
> Signed-off-by: Wen Yang <wen.yang99@....com.cn>
> Cc: Avi Fishman <avifishman70@...il.com>
> Cc: Tomer Maimon <tmaimon77@...il.com>
> Cc: Patrick Venture <venture@...gle.com>
> Cc: Nancy Yuen <yuenn@...gle.com>
> Cc: Brendan Higgins <brendanhiggins@...gle.com>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: openbmc@...ts.ozlabs.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  arch/arm/mach-npcm/platsmp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c
> index 21633c7..fe63edc 100644
> --- a/arch/arm/mach-npcm/platsmp.c
> +++ b/arch/arm/mach-npcm/platsmp.c
> @@ -35,6 +35,7 @@ static int npcm7xx_smp_boot_secondary(unsigned int cpu,
>                 goto out;
>         }
>         gcr_base = of_iomap(gcr_np, 0);
> +       of_node_put(gcr_np);
>         if (!gcr_base) {
>                 pr_err("could not iomap gcr");
>                 ret = -ENOMEM;
> @@ -63,6 +64,7 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
>                 return;
>         }
>         scu_base = of_iomap(scu_np, 0);
> +       of_node_put(scu_np);
>         if (!scu_base) {
>                 pr_err("could not iomap scu");
>                 return;
> --
> 2.9.5
>


-- 
Regards,
Avi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ