linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] mac80211: cooperate more with network namespaces
Date: Mon, 27 Jul 2009 12:12:00 -0400	[thread overview]
Message-ID: <1248711120.6965.6.camel@mj> (raw)
In-Reply-To: <1248710568.8500.7.camel@johannes.local>

On Mon, 2009-07-27 at 18:02 +0200, Johannes Berg wrote:

> Actually, you're using ath5k, right? So we can see what
> info->control.vif points to after ath5k has used the skb, because
> apparently it's a valid pointer at least, just not a real vif pointer
> any more.

I'm using ath9k.

Here's something interesting I have found.  sdata->dev is valid if
info->flags is 0x14091 and not valid if it's 0x12091.

0x4000 is IEEE80211_TX_INTFL_NEED_TXPROCESSING and 0x2000 is
IEEE80211_TX_INTFL_RCALGO.

This patch prevents any panics.  Moreover, I get a connection with the 
correct PSK.

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 75604cd..dd1fa8b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1889,6 +1889,9 @@ void ieee80211_tx_pending(unsigned long data)
 			struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 			struct ieee80211_sub_if_data *sdata;
 
+			if (!(info->flags & IEEE80211_TX_INTFL_NEED_TXPROCESSING))
+				continue;
+
 			if (WARN_ON(!info->control.vif)) {
 				kfree_skb(skb);
 				continue;



-- 
Regards,
Pavel Roskin

  reply	other threads:[~2009-07-27 16:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 22:33 [PATCH 0/3] wireless network namespace work Johannes Berg
2009-07-13 22:33 ` [PATCH 1/3] mac80211: cooperate more with network namespaces Johannes Berg
2009-07-27  0:04   ` Pavel Roskin
2009-07-27  8:27     ` Johannes Berg
2009-07-27 15:34       ` Pavel Roskin
2009-07-27 15:59         ` Johannes Berg
2009-07-27 16:02           ` Johannes Berg
2009-07-27 16:12             ` Pavel Roskin [this message]
2009-07-27 16:40               ` Pavel Roskin
2009-07-27 18:22                 ` Johannes Berg
2009-07-27 19:02                   ` Pavel Roskin
2009-07-27 19:07                     ` Johannes Berg
2009-07-27 17:30               ` Johannes Berg
2009-07-13 22:33 ` [PATCH 2/3] cfg80211: make aware of net namespaces Johannes Berg
2009-07-13 22:33 ` [PATCH 3/3] mac80211: allow using network namespaces Johannes Berg
2009-07-13 22:39 ` [HACK] mac80211: don't set netdev parent pointer 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=1248711120.6965.6.camel@mj \
    --to=proski@gnu.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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).