b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
	ath5k-devel@lists.ath5k.org, ilw@linux.intel.com,
	users@rt2x00.serialmonkey.com, b43-dev@lists.infradead.org,
	brcm80211-dev-list@broadcom.com, chunkeey@googlemail.com,
	buytenh@wantstofly.org, dsd@gentoo.org, coelho@ti.com,
	johannes.berg@intel.com
Subject: [PATCH 1/2] mac80211_hwsim: fix possible race condition in usage of info->control.sta & control.vif
Date: Fri, 13 Jul 2012 20:52:24 +0200	[thread overview]
Message-ID: <1342205545-45382-2-git-send-email-thomas@net.t-labs.tu-berlin.de> (raw)
In-Reply-To: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

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: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/mac80211_hwsim.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3f38d84..826ac7b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
 	/* now send back TX status */
 	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);
 
 	for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
-- 
1.7.11.1

  reply	other threads:[~2012-07-13 18:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 18:52 mac80211: Restructure ieee80211_tx_info->control to gain free space along tx-path Thomas Huehn
2012-07-13 18:52 ` Thomas Huehn [this message]
2012-07-13 18:52 ` [PATCH 2/2] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path Thomas Huehn
2012-07-14 10:10   ` Arend van Spriel
2012-07-14 11:44     ` [ath9k-devel] " Felix Fietkau
2012-07-14 12:55       ` Arend van Spriel
2012-07-15  4:49   ` Luciano Coelho
2012-07-17  9:44   ` Johannes Berg
2012-07-17 12:57     ` [ath5k-devel] " Thomas Huehn
2012-07-17 13:03       ` Johannes Berg
2012-07-17 20:33         ` Thomas Huehn
2012-07-18  6:48           ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342205545-45382-2-git-send-email-thomas@net.t-labs.tu-berlin.de \
    --to=thomas@net.t-labs.tu-berlin.de \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=b43-dev@lists.infradead.org \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=buytenh@wantstofly.org \
    --cc=chunkeey@googlemail.com \
    --cc=coelho@ti.com \
    --cc=dsd@gentoo.org \
    --cc=ilw@linux.intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).