From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
Johannes Berg <johannes@sipsolutions.net>,
Hauke Mehrtens <hauke@hauke-m.de>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Kernel panic in wireless-testing-2008-09-24 with rtl8187
Date: Fri, 26 Sep 2008 01:47:38 -0700 [thread overview]
Message-ID: <20080926084738.GA6331@tesla> (raw)
In-Reply-To: <1ba2fa240809260111i217ff844q73036685e6d74aee@mail.gmail.com>
On Fri, Sep 26, 2008 at 01:11:53AM -0700, Tomas Winkler wrote:
> On Fri, Sep 26, 2008 at 10:43 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > On Fri, Sep 26, 2008 at 12:06 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> >> On Thu, Sep 25, 2008 at 8:06 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> >>> Tomas Winkler wrote:
> >>>> wild guess try to revert:
> >>>> 'mac80211: make master iface not wireless'
> >>>
> >>> You win the prize. Bisection shows that
> >>> 84b0ba8ed0423a3c56a28e701b735daae3e15766 is first bad commit
> >>>
> >>> commit 84b0ba8ed0423a3c56a28e701b735daae3e15766
> >>> Author: Johannes Berg <johannes@sipsolutions.net>
> >>> Date: Tue Sep 16 14:18:59 2008 +0200
> >>>
> >>> mac80211: make master iface not wireless
> >>>
> >>>
> >>> The actual crash is in the following routine from include/net/wireless.h:
> >>>
> >>> /**
> >>> * wiphy_priv - return priv from wiphy
> >>> */
> >>> static inline void *wiphy_priv(struct wiphy *wiphy)
> >>> {
> >>> BUG_ON(!wiphy);
> >>> return &wiphy->priv;
> >>> }
> >>>
> >>> I'm still looking to see where it goes wrong.
> >>
> >> Actually wouldn't you get a stack trace here?
> >
> > Yeah not sure I tested against !wiphy on its callers and didn't find a
> > case where it hit. I don't think this is it.
>
> u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
> {
> struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
> struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> --- this is the line
--- This is the fix
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 6748ded..7d114bd 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -75,8 +75,16 @@ static int wme_downgrade_ac(struct sk_buff *skb)
/* Indicate which queue to use. */
static u16 classify80211(struct sk_buff *skb, struct net_device *dev)
{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct ieee80211_local *local;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
+ struct ieee80211_master_priv *mpriv;
+
+ /* this is not for wiphys, just for mdev */
+ BUG_ON (dev->ieee80211_ptr);
+
+ mpriv = netdev_priv(dev);
+ local = mpriv->local;
+
if (!ieee80211_is_data(hdr->frame_control)) {
/* management frames go on AC_VO queue, but are sent
@@ -114,12 +122,19 @@ static u16 classify80211(struct sk_buff *skb, struct net_device *dev)
u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct ieee80211_local *local;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+ struct ieee80211_master_priv *mpriv;
struct sta_info *sta;
u16 queue;
u8 tid;
+ /* this is not for wiphys, just for mdev */
+ BUG_ON (dev->ieee80211_ptr);
+
+ mpriv = netdev_priv(dev);
+ local = mpriv->local;
+
queue = classify80211(skb, dev);
if (unlikely(queue >= local->hw.queues))
queue = local->hw.queues - 1;
next prev parent reply other threads:[~2008-09-26 8:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 19:26 Kernel panic in wireless-testing-2008-09-24 with rtl8187 Hauke Mehrtens
2008-09-25 20:08 ` John W. Linville
2008-09-25 21:18 ` Larry Finger
2008-09-25 21:36 ` Tomas Winkler
2008-09-26 3:06 ` Larry Finger
2008-09-26 6:42 ` Tomas Winkler
2008-09-26 6:50 ` Luis R. Rodriguez
2008-09-26 6:51 ` Luis R. Rodriguez
2008-09-26 7:06 ` Luis R. Rodriguez
2008-09-26 7:43 ` Luis R. Rodriguez
2008-09-26 8:11 ` Tomas Winkler
2008-09-26 8:12 ` Luis R. Rodriguez
2008-09-26 8:47 ` Luis R. Rodriguez [this message]
2008-09-25 23:14 ` Pavel Roskin
2008-09-26 16:28 ` John W. Linville
2008-09-27 11:49 ` Hauke Mehrtens
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=20080926084738.GA6331@tesla \
--to=lrodriguez@atheros.com \
--cc=Larry.Finger@lwfinger.net \
--cc=hauke@hauke-m.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
--cc=tomasw@gmail.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).