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:   Wed, 21 Apr 2021 11:03:08 -0500
From:   Adam Ford <aford173@...il.com>
To:     Sergei Shtylyov <sergei.shtylyov@...il.com>
Cc:     netdev <netdev@...r.kernel.org>,
        Adam Ford-BE <aford@...conembedded.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: ethernet: ravb: Fix release of refclk

On Wed, Apr 21, 2021 at 9:25 AM Sergei Shtylyov
<sergei.shtylyov@...il.com> wrote:
>
> On 4/21/21 5:05 PM, Adam Ford wrote:
>
> > The call to clk_disable_unprepare() can happen before priv is
> > initialized.
>
>    This still doesn't make sense for me...
>
I need an external reference clock enabled by a programmable clock so
I added functionality to turn it on.  [1] When I did it, I was
reminded to disable the clock in the event of an the error condition.
I originally added a call to clk_disable_unprepare(priv->refclk)
under the label called out_release, but a bot responded to me that we
may jump to this error condition before priv is initialized.

This fix is supposed to create a new label so the errors that happen
after the refclk is initialized will get disabled, but any errors that
happen before the clock is initialized will handle errors like they
did before.

Does that help explain things better?

adam

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2

> > This means moving clk_disable_unprepare out of
>                                          ^ call
> > out_release into a new label.
> >
> > Fixes: 8ef7adc6beb2 ("net: ethernet: ravb: Enable optional refclk")
> > Signed-off-by: Adam Ford <aford173@...il.com>
>
> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@...il.com>
>
>
> [...]
>
> MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ