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:   Mon, 21 Sep 2020 16:56:58 -0400
From:   Jim Quinlan <james.quinlan@...adcom.com>
To:     Alex Dewar <alex.dewar90@...il.com>
Cc:     Alex Dewar <a.dewar@...sex.ac.uk>,
        Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" 
        <bcm-kernel-feedback-list@...adcom.com>,
        Jim Quinlan <jquinlan@...adcom.com>,
        "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
        <linux-rpi-kernel@...ts.infradead.org>,
        "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" 
        <linux-pci@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: brcmstb: Add missing if statement

On Mon, Sep 21, 2020 at 4:45 PM Alex Dewar <alex.dewar90@...il.com> wrote:
>
> brcm_pcie_resume() contains a return statement that was presumably
> intended to have an "if (ret)" in front of it, otherwise the function
> returns prematurely. Fix this.
>
> I don't know if this code was tested or not, but I assume that this bug
> means that this driver will not resume properly.
>
> Fixes: ad3d29c77e1e ("PCI: brcmstb: Add control of rescal reset")
> Addresses-Coverity: CID 1497099: Control flow issues (UNREACHABLE)
> Signed-off-by: Alex Dewar <a.dewar@...sex.ac.uk>
> ---
>  drivers/pci/controller/pcie-brcmstb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 7a3ff4632e7c..cb0c11b7308e 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -1154,6 +1154,7 @@ static int brcm_pcie_resume(struct device *dev)
>         clk_prepare_enable(pcie->clk);
>
>         ret = brcm_phy_start(pcie);
> +       if (ret)

Hello,
Florian suggested adding braces to the if clause and inserting a
"clk_disable_unprepare(-cie->clk);" before the return.  I am fine with
either what you have or implementing Florian's additional suggestion.

Thank you,
Jim Quinlan
Broadcom  STB
>                 return ret;
>
>         /* Take bridge out of reset so we can access the SERDES reg */
> --
> 2.28.0
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4167 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ