diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 53f8b9bd2bd4..7a8643f08929 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2561,7 +2561,8 @@ ieee80211_sta_abort_chanswitch(struct ieee80211_link_data *link) if (!local->ops->abort_channel_switch) return; - ieee80211_link_unreserve_chanctx(link); + if (rcu_access_pointer(link->conf->chanctx_conf)) + ieee80211_link_unreserve_chanctx(link); ieee80211_vif_unblock_queues_csa(sdata);