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] [day] [month] [year] [list]
Message-ID: <160269595458.884498.14663108408006981397@swboyd.mtv.corp.google.com>
Date:   Wed, 14 Oct 2020 10:19:14 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Jing Xiangfeng <jingxiangfeng@...wei.com>, mturquette@...libre.com,
        robh@...nel.org, t-kristo@...com, tony@...mide.com
Cc:     linux-omap@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, jingxiangfeng@...wei.com
Subject: Re: [PATCH v2] clk: ti: clkctrl: fix the missed kfree() for _ti_omap4_clkctrl_setup()

Quoting Jing Xiangfeng (2020-07-27 23:18:46)
> _ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Jump
> to cleanup to fix it.
> 
> Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name")
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
> ---
>  drivers/clk/ti/clkctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
> index 864c484bde1b..a562261eb061 100644
> --- a/drivers/clk/ti/clkctrl.c
> +++ b/drivers/clk/ti/clkctrl.c
> @@ -656,7 +656,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
>  
>                 hw = kzalloc(sizeof(*hw), GFP_KERNEL);
>                 if (!hw)
> -                       return;
> +                       goto cleanup;

Nobody reviewed this so I didn't apply it. I looked closer and it seems
that this may fix one leak but this is inside a while loop so presumably
we need to goto cleanup and unwind the loop of allocations? Put another
way, there is more work to do here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ