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]
Date:	Mon, 1 Feb 2016 17:07:38 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:	linux-clk@...r.kernel.org,
	Michael Turquette <mturquette@...libre.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v2 06/16] clk: move core->parents allocation to
 clk_register()

On 12/28, Masahiro Yamada wrote:
> Currently, __clk_core_init() allows failure of the kcalloc() for the
> core->parents.  So, clk_fetch_parent_index() and __clk_init_parent()
> also try to allocate core->parents in case it has not been allocated
> yet.  Scattering memory allocation here and there makes things
> complicated.
> 
> Like other clk_core members, allocate core->parents in clk_register()
> and let it fail in case of memory shortage.  If we cannot allocate
> such a small piece of memory, the system is already insane.  There is
> no point to postpone the memory allocation.
> 
> Also, allocate core->parents regardless of core->num_parents.  We want
> it even if core->num_parents == 1 because clk_fetch_parent_index()
> might be called against the clk_core with a single parent.
> 
> If core->num_parents == 0, core->parents is set to ZERO_SIZE_PTR. It
> is harmless because no access happens to core->parents in such a case.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ