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] [day] [month] [year] [list]
Message-ID: <20201116094538.47937d15@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 16 Nov 2020 09:45:38 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Marco Felsch <m.felsch@...gutronix.de>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Zhang Changzhong <zhangchangzhong@...wei.com>, andrew@...n.ch,
        hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: phy: smsc: add missed clk_disable_unprepare in
 smsc_phy_probe()

On Mon, 16 Nov 2020 10:26:07 +0100 Marco Felsch wrote:
> > > The code right above looks highly questionable as well:
> > > 
> > >         priv->refclk = clk_get_optional(dev, NULL);
> > >         if (IS_ERR(priv->refclk))
> > >                 dev_err_probe(dev, PTR_ERR(priv->refclk), "Failed to request clock\n");
> > >  
> > >         ret = clk_prepare_enable(priv->refclk);
> > >         if (ret)
> > >                 return ret;
> > > 
> > > I don't think clk_prepare_enable() will be too happy to see an error
> > > pointer. This should probably be:
> > > 
> > >         priv->refclk = clk_get_optional(dev, NULL);
> > >         if (IS_ERR(priv->refclk))
> > >                 return dev_err_probe(dev, PTR_ERR(priv->refclk), 
> > > 				      "Failed to request clock\n");  
> > 
> > Right, especially if EPROBE_DEFER must be returned because the clock
> > provider is not ready yet, we should have a chance to do that.  
> 
> damn.. I missed the return here. Thanks for covering that. Should I send
> a fix or did you do that already?

Please do, I don't see any fix for this issue in patchwork right now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ