Commit d16827c
wifi: brcmfmac: Fix potential use-after-free issue when stopping watchdog task
commit c623b63 upstream.
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().
Cc: stable@vger.kernel.org
Fixes: 373c83a ("brcmfmac: stop watchdog before detach and free everything")
Fixes: a9ffda8 ("brcm80211: fmac: abstract bus_stop interface function pointer")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20260416093339.2066829-1-m.szyprowski@samsung.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1e9e55c commit d16827c
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2475 | 2475 | | |
2476 | 2476 | | |
2477 | 2477 | | |
| 2478 | + | |
2478 | 2479 | | |
2479 | | - | |
| 2480 | + | |
2480 | 2481 | | |
2481 | 2482 | | |
2482 | 2483 | | |
| |||
4557 | 4558 | | |
4558 | 4559 | | |
4559 | 4560 | | |
| 4561 | + | |
4560 | 4562 | | |
4561 | | - | |
| 4563 | + | |
4562 | 4564 | | |
4563 | 4565 | | |
4564 | 4566 | | |
| |||
0 commit comments