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: <162466387362.3259633.2364843071785127818@swboyd.mtv.corp.google.com>
Date:   Fri, 25 Jun 2021 16:31:13 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Dmitry Osipenko <digetx@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Michael Turquette <mturquette@...libre.com>,
        Peter De Schrijver <pdeschrijver@...dia.com>,
        Prashant Gaikwad <pgaikwad@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Zhen Lei <thunder.leizhen@...wei.com>,
        linux-clk <linux-clk@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-tegra <linux-tegra@...r.kernel.org>
Cc:     Zhen Lei <thunder.leizhen@...wei.com>
Subject: Re: [PATCH 1/1] clk: tegra: tegra124-emc: Fix possible memory leak

Quoting Zhen Lei (2021-06-17 01:27:59)
> When krealloc() fails to expand the memory and returns NULL, the original
> memory is not released. In this case, the original "timings" scale should
> be maintained.
> 
> Fixes: 888ca40e2843 ("clk: tegra: emc: Support multiple RAM codes")
> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
> ---

Looks correct, but when does krealloc() return NULL? My read of the
kerneldoc is that it would return the original memory if the new
allocation "failed".

Reviewed-by: Stephen Boyd <sboyd@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ