Skip to contentSkip to conversation

Kernel panic in wireless-testing-2008-09-24 with rtl8187

DISCUSSION Hauke Mehrtens 7 participants 16 messages Sep 25, 2008 – Sep 27, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

It happens at every start. After starting an older linux version everything works as it should.

I think it happens in the connecting process.

I am using Ubuntu Hardy with network manager 0.7 I have got an rtl8187 chip on my Asus P5B Deluxe wifi.

Hauke

#1 lore raw
Quoted 11 lines · Hauke Mehrtens

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

It happens at every start. After starting an older linux version everything works as it should.

I think it happens in the connecting process.

I am using Ubuntu Hardy with network manager 0.7 I have got an rtl8187 chip on my Asus P5B Deluxe wifi.

Could you try master-2008-09-22 and master-2008-09-23 as well? That might help to isolate the issue.

Thanks!

John

Signature · 2 lines
John W. Linville		Linux should be at the core
[email protected]			of your literate lifestyle.
#2 lore raw
In reply to Hauke Mehrtens
Quoted 11 lines · Hauke Mehrtens

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

It happens at every start. After starting an older linux version everything works as it should.

I think it happens in the connecting process.

I am using Ubuntu Hardy with network manager 0.7 I have got an rtl8187 chip on my Asus P5B Deluxe wifi.

I can confirm this with and without my RTL8187B inserted.

Larry

#3 lore raw
Quoted 8 lines · Larry Finger
Quoted 7 lines · Hauke Mehrtens

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

It happens at every start. After starting an older linux version everything works as it should.

Quoted 9 lines
Quoted 4 lines

I think it happens in the connecting process.

I am using Ubuntu Hardy with network manager 0.7 I have got an rtl8187 chip on my Asus P5B Deluxe wifi.

I can confirm this with and without my RTL8187B inserted.

Larry

wild guess try to revert:
'mac80211: make master iface not wireless'

Tomas

#13 lore raw
In reply to Hauke Mehrtens
Quoted 3 lines · Hauke Mehrtens

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

Same thing here. Also in ieee80211_select_queue. Fedora Development, x86_64, current wireless-testing/master. The system where it happens has b43, b43legacy and rt61pci compiled as modules, they all are loaded on startup, and there are supported cards for all of them.

Due to a finicky video card, I cannot use more than 25 lines on the terminal, so I don't see if there is a BUG before the trace in my case.

Signature · 2 lines
Regards,
Pavel Roskin
#4 lore raw
In reply to Tomas Winkler
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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.

Larry

#5 lore raw
Quoted 20 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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)

Quoted 6 lines
{
       BUG_ON(!wiphy);
       return &wiphy->priv;
}

I'm still looking to see where it goes wrong.

What do you mean? The root cause is written in the commit log. Tomas

#6 lore raw
Quoted 26 lines · Tomas Winkler
Quoted 25 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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;
}
Quoted 4 lines
Quoted 1 line

I'm still looking to see where it goes wrong.

What do you mean? The root cause is written in the commit log. Tomas

The question is who calls wiphy_priv(mdev) or wiphy_priv(NULL) and where.

Luis

#7 lore raw
Quoted 27 lines · Luis R. Rodriguez
Quoted 26 lines · Tomas Winkler
Quoted 25 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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;
}
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I'm still looking to see where it goes wrong.

What do you mean? The root cause is written in the commit log. Tomas

The question is who calls wiphy_priv(mdev) or wiphy_priv(NULL) and where.

Actually just the later.

Luis

#8 lore raw
In reply to Larry Finger
Quoted 20 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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)

Quoted 6 lines
{
       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?

Luis

#9 lore raw
Quoted 26 lines · Luis R. Rodriguez
Quoted 25 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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;
}
Quoted 3 lines
Quoted 1 line

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.

Luis

#10 lore raw
Quoted 27 lines · Luis R. Rodriguez
Quoted 26 lines · Luis R. Rodriguez
Quoted 25 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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;
}
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

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

Tomas

#11 lore raw
Quoted 32 lines · Tomas Winkler
Quoted 31 lines · Luis R. Rodriguez
Quoted 29 lines · Luis R. Rodriguez
Quoted 20 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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)

Quoted 6 lines
{
       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?

Quoted 8 lines
Quoted 2 lines

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

Yeah I just landed there too.

Luis

#12 lore raw
In reply to Tomas Winkler
Quoted 32 lines · Tomas Winkler
Quoted 31 lines · Luis R. Rodriguez
Quoted 29 lines · Luis R. Rodriguez
Quoted 20 lines · Larry Finger
Quoted 2 lines · Tomas Winkler

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 <[email protected]>
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)

Quoted 6 lines
{
       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?

Quoted 8 lines
Quoted 2 lines

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

net/mac80211/wme.c +17 -2
index 6748ded..7d114bd 100644
@@ -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;
#14 lore raw
In reply to Hauke Mehrtens
Quoted 11 lines · Hauke Mehrtens

After upgrading from wireless-testing-2008-09-12 to wireless-testing-2008-09-24 I got the following kernel panic short after starting linux.

It happens at every start. After starting an older linux version everything works as it should.

I think it happens in the connecting process.

I am using Ubuntu Hardy with network manager 0.7 I have got an rtl8187 chip on my Asus P5B Deluxe wifi.

I have applied Johannes's fix (slightly more complete than the one from Luis) to wireless-testing, and it is available now. Please verify that it is working for you.

Thanks!

John

Signature · 2 lines
John W. Linville		Linux should be at the core
[email protected]			of your literate lifestyle.
#15 lore raw
Quoted 3 lines · John W. Linville

I have applied Johannes's fix (slightly more complete than the one from Luis) to wireless-testing, and it is available now. Please verify that it is working for you.

Thanks for the patch. It loads and connects to the wireless network like with older kernels.

Hauke