mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Arend van Spriel <aspriel@gmail.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Chi-hsien Lin <chi-hsien.lin@infineon.com>,
	Wright Feng <wright.feng@infineon.com>,
	Chung-hsien Hsu <chung-hsien.hsu@infineon.com>
Cc: kernel@pengutronix.de, SHA-cyfmac-dev-list@infineon.com,
	brcm80211-dev-list.pdl@broadcom.com, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, rafal@milecki.pl
Subject: Re: [PATCH] brcmfmac: pcie: fix oops on failure to resume and reprobe
Date: Tue, 17 Aug 2021 12:01:41 +0200	[thread overview]
Message-ID: <263120bc-72be-2acd-35cb-4cbc3d543804@pengutronix.de> (raw)
In-Reply-To: <20210817063521.22450-1-a.fatoum@pengutronix.de>

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@pengutronix.de>
> ---
> To: Arend van Spriel <aspriel@gmail.com>
> To: Franky Lin <franky.lin@broadcom.com>
> To: Hante Meuleman <hante.meuleman@broadcom.com>
> To: Chi-hsien Lin <chi-hsien.lin@infineon.com>
> To: Wright Feng <wright.feng@infineon.com>
> To: Chung-hsien Hsu <chung-hsien.hsu@infineon.com>
> Cc: SHA-cyfmac-dev-list@infineon.com
> Cc: brcm80211-dev-list.pdl@broadcom.com
> Cc: netdev@vger.kernel.org
> Cc: linux-wireless@vger.kernel.org
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-kernel@vger.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 |

  reply	other threads:[~2021-08-17 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  6:35 Ahmad Fatoum
2021-08-17 10:01 ` Ahmad Fatoum [this message]
     [not found] ` <CAHp75Vfc_T04p95PgVUd+CK+ttPwX2aOC4WPD35Z01WQV1MxKw@mail.gmail.com>
2021-08-17 11:11   ` Ahmad Fatoum
2021-08-17 11:54     ` Andy Shevchenko
2021-08-17 12:03       ` Ahmad Fatoum
2021-08-17 12:07         ` Ahmad Fatoum
2021-08-17 13:06           ` Andy Shevchenko
2021-08-17 13:19             ` Ahmad Fatoum
2021-08-29 11:45 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=263120bc-72be-2acd-35cb-4cbc3d543804@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=chi-hsien.lin@infineon.com \
    --cc=chung-hsien.hsu@infineon.com \
    --cc=davem@davemloft.net \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --cc=wright.feng@infineon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®