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: <CAPDyKFpZ+-6b3kPyNacPQ33=Ssdjs=fvFxkr4iSUT_hm1YzVTg@mail.gmail.com>
Date:	Fri, 3 May 2013 10:51:50 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Fabio Baltieri <fabio.baltieri@...aro.org>
Cc:	Mike Turquette <mturquette@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH] clk: ux500: clk-sysctrl: handle clocks with no parents

On 30 April 2013 14:45, Fabio Baltieri <fabio.baltieri@...aro.org> wrote:
> Fix clk_reg_sysctrl() to set main clock registers of new struct
> clk_sysctrl even if the registered clock has no parents.
>
> This fixes an issue where "ulpclk" was registered with all clk->reg_*
> fields uninitialized, causing a -EINVAL error from clk_prepare().
>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Signed-off-by: Fabio Baltieri <fabio.baltieri@...aro.org>
> ---
>  drivers/clk/ux500/clk-sysctrl.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c
> index bc7e9bd..e364c9d 100644
> --- a/drivers/clk/ux500/clk-sysctrl.c
> +++ b/drivers/clk/ux500/clk-sysctrl.c
> @@ -145,7 +145,13 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
>                 return ERR_PTR(-ENOMEM);
>         }
>
> -       for (i = 0; i < num_parents; i++) {
> +       /* set main clock registers */
> +       clk->reg_sel[0] = reg_sel[0];
> +       clk->reg_bits[0] = reg_bits[0];
> +       clk->reg_mask[0] = reg_mask[0];
> +
> +       /* handle clocks with more than one parent */
> +       for (i = 1; i < num_parents; i++) {
>                 clk->reg_sel[i] = reg_sel[i];
>                 clk->reg_bits[i] = reg_bits[i];
>                 clk->reg_mask[i] = reg_mask[i];
> --
> 1.8.2
>

Acked-by: Ulf Hansson <ulf.hansson@...aro.org>

This is bugfix, should go "stable" as well?

Kind regards
Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ