Commit b0e40e72 authored by Thomas Huehn's avatar Thomas Huehn Committed by Johannes Berg

mac80211_hwsim: fix race condition with sta/vif pointers

info->control.sta and control.vif may only be dereferenced
during the drv_tx call otherwise could lead to use-after-free
bugs.
Signed-off-by: default avatarThomas Huehn <thomas@net.t-labs.tu-berlin.de>
[reword commit message]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7f9f78ab
...@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, ...@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
/* now send back TX status */ /* now send back TX status */
txi = IEEE80211_SKB_CB(skb); txi = IEEE80211_SKB_CB(skb);
if (txi->control.vif)
hwsim_check_magic(txi->control.vif);
if (txi->control.sta)
hwsim_check_sta_magic(txi->control.sta);
ieee80211_tx_info_clear_status(txi); ieee80211_tx_info_clear_status(txi);
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment