From: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: 2021-08-17 06:36:30
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.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
To: Arend van Spriel <redacted>
To: Franky Lin <redacted>
To: Hante Meuleman <redacted>
To: Chi-hsien Lin <redacted>
To: Wright Feng <redacted>
To: Chung-hsien Hsu <redacted>
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 <redacted>
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(-)
From: Ahmad Fatoum <a.fatoum@pengutronix.de> Date: 2021-08-17 10:01:53
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
quoted hunk
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
To: Arend van Spriel <redacted>
To: Franky Lin <redacted>
To: Hante Meuleman <redacted>
To: Chi-hsien Lin <redacted>
To: Wright Feng <redacted>
To: Chung-hsien Hsu <redacted>
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 <redacted>
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(-)
From: Kalle Valo <hidden> Date: 2021-08-29 11:46:15
Ahmad Fatoum [off-list ref] 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.
Fixes: 8602e62441ab ("brcmfmac: pass bus to the __brcmf_err() in pcie.c")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>