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: <263120bc-72be-2acd-35cb-4cbc3d543804@pengutronix.de>
Date:   Tue, 17 Aug 2021 12:01:41 +0200
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     Arend van Spriel <aspriel@...il.com>,
        Franky Lin <franky.lin@...adcom.com>,
        Hante Meuleman <hante.meuleman@...adcom.com>,
        Chi-hsien Lin <chi-hsien.lin@...ineon.com>,
        Wright Feng <wright.feng@...ineon.com>,
        Chung-hsien Hsu <chung-hsien.hsu@...ineon.com>
Cc:     kernel@...gutronix.de, SHA-cyfmac-dev-list@...ineon.com,
        brcm80211-dev-list.pdl@...adcom.com, netdev@...r.kernel.org,
        linux-wireless@...r.kernel.org, Kalle Valo <kvalo@...eaurora.org>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org, rafal@...ecki.pl
Subject: Re: [PATCH] brcmfmac: pcie: fix oops on failure to resume and reprobe

On 17.08.21 08:35, Ahmad Fatoum wrote:
> When resuming from suspend, brcmf_pcie_pm_leave_D3 will first attempt a
> hot resume and then fall back to removing the PCI device and then
> reprobing. If this probe fails, the kernel will oops, because brcmf_err,
> which is called to report the failure will dereference the stale bus
> pointer. Open code and use the default bus-less brcmf_err to avoid this.

Should've included a Fixes tag:

Fixes: 8602e62441ab ("brcmfmac: pass bus to the __brcmf_err() in pcie.c")

Please let me know if I should resend with the tag added.

Cheers,
Ahmad
 
> Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
> ---
> To: Arend van Spriel <aspriel@...il.com>
> To: Franky Lin <franky.lin@...adcom.com>
> To: Hante Meuleman <hante.meuleman@...adcom.com>
> To: Chi-hsien Lin <chi-hsien.lin@...ineon.com>
> To: Wright Feng <wright.feng@...ineon.com>
> To: Chung-hsien Hsu <chung-hsien.hsu@...ineon.com>
> Cc: SHA-cyfmac-dev-list@...ineon.com
> Cc: brcm80211-dev-list.pdl@...adcom.com
> Cc: netdev@...r.kernel.org
> Cc: linux-wireless@...r.kernel.org
> Cc: Kalle Valo <kvalo@...eaurora.org>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: linux-kernel@...r.kernel.org
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> index 9ef94d7a7ca7..d824bea4b79d 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -2209,7 +2209,7 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev)
>  
>  	err = brcmf_pcie_probe(pdev, NULL);
>  	if (err)
> -		brcmf_err(bus, "probe after resume failed, err=%d\n", err);
> +		__brcmf_err(NULL, __func__, "probe after resume failed, err=%d\n", err);
>  
>  	return err;
>  }
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ