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

Arend van Spriel <[email protected]> Fri, 17 Apr 2026 21:26:46 +0200
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
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 <[email protected]>

> Signed-off-by: Marek Szyprowski <[email protected]>
> ---

[...]

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