Message ID | 20210601100128.69561-1-tongtiangen@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On 01-06-2021 12:01, Tong Tiangen wrote: > brcmf_sdiod_remove has been called inside brcmf_sdiod_probe when fails, > so there's no need to call another one. Otherwise, sdiodev->freezer > would be double freed. > > Fixes: 7836102a750a ("brcmfmac: reset SDIO bus on a firmware crash") Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> > Signed-off-by: Tong Tiangen <tongtiangen@huawei.com> > --- > drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 - > 1 file changed, 1 deletion(-)
Tong Tiangen <tongtiangen@huawei.com> wrote: > brcmf_sdiod_remove has been called inside brcmf_sdiod_probe when fails, > so there's no need to call another one. Otherwise, sdiodev->freezer > would be double freed. > > Fixes: 7836102a750a ("brcmfmac: reset SDIO bus on a firmware crash") > Signed-off-by: Tong Tiangen <tongtiangen@huawei.com> > Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Patch applied to wireless-drivers-next.git, thanks. 7ea7a1e05c7f brcmfmac: Fix a double-free in brcmf_sdio_bus_reset
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 16ed325795a8..3a1c98a046f0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4162,7 +4162,6 @@ static int brcmf_sdio_bus_reset(struct device *dev) if (ret) { brcmf_err("Failed to probe after sdio device reset: ret %d\n", ret); - brcmf_sdiod_remove(sdiodev); } return ret;
brcmf_sdiod_remove has been called inside brcmf_sdiod_probe when fails, so there's no need to call another one. Otherwise, sdiodev->freezer would be double freed. Fixes: 7836102a750a ("brcmfmac: reset SDIO bus on a firmware crash") Signed-off-by: Tong Tiangen <tongtiangen@huawei.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 - 1 file changed, 1 deletion(-)