From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net,
Johannes Berg <johannes.berg@intel.com>,
Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 2/2] iwlagn: fix offchannel TX bug
Date: Thu, 10 Mar 2011 20:13:27 -0800 [thread overview]
Message-ID: <1299816807-26813-3-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1299816807-26813-1-git-send-email-wey-yi.w.guy@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
In the case where remain-on-channel rather than
offchannel TX should be used, my offchannel TX
patch introduced a bug because mac80211 will
use the now-freed SKB.
iwlagn shouldn't free the SKB when it returns 1
here since then the SKB will still be used.
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 5f4e481..b57fbbf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2996,7 +2996,7 @@ static int iwl_mac_offchannel_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
out:
mutex_unlock(&priv->mutex);
free:
- if (ret)
+ if (ret < 0)
kfree_skb(skb);
return ret;
--
1.7.0.4
next prev parent reply other threads:[~2011-03-11 4:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 4:13 [PATCH 0/2] update for 2.6.39 Wey-Yi Guy
2011-03-11 4:13 ` [PATCH 1/2] iwlagn: support off-channel TX Wey-Yi Guy
2011-03-11 4:13 ` Wey-Yi Guy [this message]
2011-03-11 9:02 ` [PATCH 0/2] update for 2.6.39 Johannes Berg
2011-03-11 8:51 ` Guy, Wey-Yi
2011-03-11 14:13 ` John W. Linville
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=1299816807-26813-3-git-send-email-wey-yi.w.guy@intel.com \
--to=wey-yi.w.guy@intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).