linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlagn: fix offchannel TX bug
@ 2011-03-05 18:35 Johannes Berg
  2011-03-07 18:54 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-03-05 18:35 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Reinette Chatre

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>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-03-05 19:32:58.000000000 +0100
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-03-05 19:33:08.000000000 +0100
@@ -3171,7 +3171,7 @@ static int iwl_mac_offchannel_tx(struct
  out:
 	mutex_unlock(&priv->mutex);
  free:
-	if (ret)
+	if (ret < 0)
 		kfree_skb(skb);
 
 	return ret;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-07 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 18:35 [PATCH] iwlagn: fix offchannel TX bug Johannes Berg
2011-03-07 18:54 ` John W. Linville
2011-03-07 19:02   ` Johannes Berg
2011-03-07 19:44     ` Guy, Wey-Yi

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).