]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
brcmfmac: pcie: fix oops on failure to resume and reprobe
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Tue, 17 Aug 2021 06:35:22 +0000 (08:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 08:00:54 +0000 (10:00 +0200)
commit361789e93c6fb69026b9b8a4d3b0cf63a3b4a4bf
treede2f4dbb6ba2de27a4b902e4e16d9c171433b6b9
parent8fb12e84fe31847a317d397dee6a24a53ea4324d
brcmfmac: pcie: fix oops on failure to resume and reprobe

[ Upstream commit d745ca4f2c4ae9f1bd8cf7d8ac6e22d739bffd19 ]

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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210817063521.22450-1-a.fatoum@pengutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c