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: <CAARXrtnQn-rbUc_Ykdn5dpK9fO+jMYFR=ocmkQweBxKQY4L2rg@mail.gmail.com>
Date:   Fri, 9 Mar 2018 11:23:08 +0800
From:   Lei YU <mine260309@...il.com>
To:     Eddie James <eajames@...ux.vnet.ibm.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-clk@...r.kernel.org, Joel Stanley <joel@....id.au>,
        Michael Turquette <mturquette@...libre.com>, sboyd@...nel.org,
        Ryan Chen <ryan_chen@...eedtech.com>
Subject: Re: [PATCH v2 2/2] clk: aspeed: Prevent reset if clock is enabled

>  static int aspeed_clk_enable(struct clk_hw *hw)
>  {
>         struct aspeed_clk_gate *gate = to_aspeed_clk_gate(hw);
> @@ -215,6 +227,11 @@ static int aspeed_clk_enable(struct clk_hw *hw)
>
>         spin_lock_irqsave(gate->lock, flags);
>
> +       if (aspeed_clk_is_enabled(hw)) {
> +               spin_unlock_irqrestore(gate->lock, flags);
> +               return 0;
> +       }
> +

I think this piece of code can be run before spin_lock_irqsave(), so it is
able to just return without spin_unlock_irqrestore()?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ