Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4581d91b authored by Thomas Huehn's avatar Thomas Huehn Committed by John W. Linville
Browse files

mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif



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>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c297977e
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -739,11 +739,6 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *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);

	/* frame was transmitted at most favorable rate at first attempt */