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: <20220325011037.03173C340EC@smtp.kernel.org>
Date:   Thu, 24 Mar 2022 18:10:35 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Andy Gross <agross@...nel.org>,
        Ansuel Smith <ansuelsmth@...il.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 03/18] clk: qcom: gcc-ipq806x: add PXO_SRC in clk table

Quoting Ansuel Smith (2022-03-21 16:15:33)
> PXO_SRC is currently defined in the gcc include and referenced in the
> ipq8064 DTSI. Correctly provide a clk after gcc probe to fix kernel
> panic if a driver starts to actually use it.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
> ---

What is this patch about? clk providers shouldn't be calling clk_get().

>  drivers/clk/qcom/gcc-ipq806x.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c
> index 27f6d7626abb..7271d3afdc89 100644
> --- a/drivers/clk/qcom/gcc-ipq806x.c
> +++ b/drivers/clk/qcom/gcc-ipq806x.c
> @@ -26,6 +26,8 @@
>  #include "clk-hfpll.h"
>  #include "reset.h"
>  
> +static struct clk_regmap pxo = { };
> +
>  static struct clk_pll pll0 = {
>         .l_reg = 0x30c4,
>         .m_reg = 0x30c8,
> @@ -2754,6 +2756,7 @@ static struct clk_dyn_rcg ubi32_core2_src_clk = {
>  };
>  
>  static struct clk_regmap *gcc_ipq806x_clks[] = {
> +       [PXO_SRC] = NULL,
>         [PLL0] = &pll0.clkr,
>         [PLL0_VOTE] = &pll0_vote,
>         [PLL3] = &pll3.clkr,
> @@ -3083,6 +3086,10 @@ static int gcc_ipq806x_probe(struct platform_device *pdev)
>         if (ret)
>                 return ret;
>  
> +       clk = clk_get(dev, "pxo");
> +       pxo.hw = *__clk_get_hw(clk);
> +       gcc_ipq806x_clks[PXO_SRC] = &pxo;
> +
>         regmap = dev_get_regmap(dev, NULL);
>         if (!regmap)
>                 return -ENODEV;
> -- 
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ