All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset
@ 2021-06-01 10:01 Tong Tiangen
  2021-06-01 11:37 ` Arend van Spriel
  2021-06-15 10:37 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Tong Tiangen @ 2021-06-01 10:01 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-hsien Lin,
	Wright Feng, Chung-hsien Hsu, Kalle Valo, David S. Miller,
	Jakub Kicinski
  Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	netdev, linux-kernel, Tong Tiangen

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(-)

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;
-- 
2.18.0.huawei.25


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset
  2021-06-01 10:01 [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset Tong Tiangen
@ 2021-06-01 11:37 ` Arend van Spriel
  2021-06-15 10:37 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Arend van Spriel @ 2021-06-01 11:37 UTC (permalink / raw)
  To: Tong Tiangen, Arend van Spriel, Franky Lin, Hante Meuleman,
	Chi-hsien Lin, Wright Feng, Chung-hsien Hsu, Kalle Valo,
	David S. Miller, Jakub Kicinski
  Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	netdev, linux-kernel

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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset
  2021-06-01 10:01 [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset Tong Tiangen
  2021-06-01 11:37 ` Arend van Spriel
@ 2021-06-15 10:37 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-15 10:37 UTC (permalink / raw)
  To: Tong Tiangen
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-hsien Lin,
	Wright Feng, Chung-hsien Hsu, David S. Miller, Jakub Kicinski,
	linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	netdev, linux-kernel, Tong Tiangen

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

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210601100128.69561-1-tongtiangen@huawei.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-15 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 10:01 [PATCH -next] brcmfmac: Fix a double-free in brcmf_sdio_bus_reset Tong Tiangen
2021-06-01 11:37 ` Arend van Spriel
2021-06-15 10:37 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.