From: Johannes Berg In listen state, nothing has been sent, so there's no need to send a WLAN_SP_MESH_PEERING_CLOSE frame. Also, in case the station just failed to insert, e.g. due to a missing channel context, it might not be possible to transmit the frame at all, leading to a warning. Reported-by: syzbot+8bd4574e8c52c48c2595@syzkaller.appspotmail.com Signed-off-by: Johannes Berg --- net/mac80211/mesh_plink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 268857467f29..6ce3ae3fb39b 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -399,11 +399,13 @@ u64 mesh_plink_deactivate(struct sta_info *sta) { struct ieee80211_sub_if_data *sdata = sta->sdata; u64 changed; + bool send_close; spin_lock_bh(&sta->mesh->plink_lock); + send_close = sta->mesh->plink_state != NL80211_PLINK_LISTEN; changed = __mesh_plink_deactivate(sta); - if (!sdata->u.mesh.user_mpm) { + if (!sdata->u.mesh.user_mpm && send_close) { sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED; mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE, sta->sta.addr, sta->mesh->llid, -- 2.55.0