summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorMichael-CY Lee <michael-cy.lee@mediatek.com>2024-07-05 15:43:26 +0800
committerJohannes Berg <johannes.berg@intel.com>2024-07-08 18:28:47 +0200
commit7cd445635562a38c1e3534e3e691c25d2737be54 (patch)
tree21dc64073ea2592dd3d45a909452ff6b8d10efe0 /net/mac80211
parentb5d14b0c6716fad7f0c94ac6e1d6f60a49f985c7 (diff)
wifi: mac80211: cancel color change finalize work when link is stopped
The color change finalize work might be called after the link is stopped, which might lead to a kernel crash. Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> Link: https://patch.msgid.link/20240705074326.11172-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/link.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/link.c b/net/mac80211/link.c
index 2e6e92defbca..1a211b8d4057 100644
--- a/net/mac80211/link.c
+++ b/net/mac80211/link.c
@@ -72,6 +72,8 @@ void ieee80211_link_stop(struct ieee80211_link_data *link)
cancel_delayed_work_sync(&link->color_collision_detect_work);
wiphy_work_cancel(link->sdata->local->hw.wiphy,
+ &link->color_change_finalize_work);
+ wiphy_work_cancel(link->sdata->local->hw.wiphy,
&link->csa.finalize_work);
ieee80211_link_release_channel(link);
}