diff options
| author | Linmao Li <lilinmao@kylinos.cn> | 2026-08-13 16:23:13 +0800 |
|---|---|---|
| committer | Jeff Chen <jeff.chen_1@nxp.com> | 2026-10-06 21:13:54 +0800 |
| commit | 5c9260d7c6990875fc788ebb86ea2bf08b492704 (patch) | |
| tree | 0243403cbf0f9411521995720acedfa6d0a6692e /tools/perf/scripts/python | |
| parent | 128411832c62ca517e4abd938229f0ee40823fdb (diff) | |
| download | linux-5c9260d7c6990875fc788ebb86ea2bf08b492704.tar.gz linux-5c9260d7c6990875fc788ebb86ea2bf08b492704.zip | |
wifi: nxpwifi: wait for the wakeup timer before the adapter is freed
nxpwifi_adapter_cleanup() stops adapter->wakeup_timer with
timer_delete(), which does not wait for a running callback. The
callback goes on using the adapter: wakeup_timer_fn() sets
adapter->hw_status, walks the command queues through
nxpwifi_cancel_all_pending_cmd() and calls adapter->if_ops.card_reset().
Both paths that reach nxpwifi_adapter_cleanup() free the adapter right
afterwards, through nxpwifi_free_adapter() in nxpwifi_remove_card() and
in the nxpwifi_add_card() error unwind.
Use timer_delete_sync() so the callback has finished before the adapter
is released.
mwifiex fixed the same issue in commit ae5e95d41574 ("wifi: mwifiex: fix
use-after-free in mwifiex_adapter_cleanup()").
Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x")
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com>
Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
