Re: [PATCH] wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task

Arend van Spriel
2026-04-17T19:26:52Z

On 16/04/2026 11:33, Marek Szyprowski wrote:
> Watchdog task might end between send_sig() and kthread_stop() calls, what
> results in the use-after-free issue. Fix this by increasing watchdog task
> reference count before calling send_sig() and dropping it by switching to
> kthread_stop_put().
>
> Fixes: 373c83a801f1 ("brcmfmac: stop watchdog before detach and free everything")
> Fixes: a9ffda88be74 ("brcm80211: fmac: abstract bus_stop interface function pointer")

Looks good to me. Maybe add stable?

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---

[...]

> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)