Skip to content

Commit 12b220a

Browse files
nbd168jmberg-intel
authored andcommitted
wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta
Avoid potential data corruption issues caused by uninitialized driver private data structures. Reported-by: Brian Coverstone <[email protected]> Fixes: 6a9d1b9 ("mac80211: add pre-RCU-sync sta removal driver operation") Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 899c2c1 commit 12b220a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac80211/sta_info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,8 @@ static int __must_check __sta_info_destroy_part1(struct sta_info *sta)
12641264
list_del_rcu(&sta->list);
12651265
sta->removed = true;
12661266

1267-
drv_sta_pre_rcu_remove(local, sta->sdata, sta);
1267+
if (sta->uploaded)
1268+
drv_sta_pre_rcu_remove(local, sta->sdata, sta);
12681269

12691270
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
12701271
rcu_access_pointer(sdata->u.vlan.sta) == sta)

0 commit comments

Comments
 (0)