2009-07-30 14:32:25

by Michael Büsch

[permalink] [raw]
Subject: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

Ath5k from today's compat-wireless triggers the following WARNing
on hostapd startup.

[ 1588.927501] cfg80211: Calling CRDA to update world regulatory domain
[ 1588.967169] ath5k 0000:04:00.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 1588.967334] ath5k 0000:04:00.0: registered as 'phy0'
[ 1588.974208] cfg80211: World regulatory domain updated:
[ 1588.974271] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1588.974342] (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[ 1589.157198] ath: EEPROM regdomain: 0x809c
[ 1589.157205] ath: EEPROM indicates we should expect a country code
[ 1589.157210] ath: doing EEPROM country->regdmn map search
[ 1589.157215] ath: country maps to regdmn code: 0x52
[ 1589.157220] ath: Country alpha2 being used: CN
[ 1589.157224] ath: Regpair used: 0x52
[ 1589.157563] phy0: Selected rate control algorithm 'minstrel'
[ 1589.158027] ath5k phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)
[ 1589.158516] cfg80211: Calling CRDA for country: CN
[ 1589.168612] cfg80211: Regulatory domain changed to country: CN
[ 1589.168670] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1589.168739] (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1589.168788] (5735000 KHz - 5835000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[ 1668.667833] cfg80211: Calling CRDA for country: DE
[ 1668.674341] cfg80211: Regulatory domain changed to country: DE
[ 1668.674397] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1668.674463] (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1668.674528] (5150000 KHz - 5255000 KHz @ 40000 KHz), (N/A, 2301 mBm)
[ 1668.674577] (5470000 KHz - 5650000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[ 1669.799870] ------------[ cut here ]------------
[ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
[ 1669.799982] Hardware name:
[ 1669.800023] Modules linked in: ath5k mac80211 ath cfg80211
[ 1669.800192] Pid: 24862, comm: hostapd Not tainted 2.6.30.2 #3
[ 1669.800238] Call Trace:
[ 1669.800287] [<ffffffff80248e3b>] ? local_bh_enable_ip+0x8b/0xb0
[ 1669.800340] [<ffffffff802432f8>] warn_slowpath_common+0x78/0xd0
[ 1669.800391] [<ffffffff8024335f>] warn_slowpath_null+0xf/0x20
[ 1669.800441] [<ffffffff80248e3b>] local_bh_enable_ip+0x8b/0xb0
[ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
[ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
[ 1669.800625] [<ffffffffa006a283>] ath5k_beacon_update+0x23/0x430 [ath5k]
[ 1669.800682] [<ffffffffa006b0ac>] ? ath5k_beacon_config+0xcc/0x200 [ath5k]
[ 1669.800735] [<ffffffff807de4b0>] ? wait_for_common+0x150/0x170
[ 1669.800791] [<ffffffffa006b30f>] ath5k_bss_info_changed+0x12f/0x1e0 [ath5k]
[ 1669.800854] [<ffffffffa002c18a>] ieee80211_bss_info_change_notify+0x10a/0x1e0 [mac80211]
[ 1669.800931] [<ffffffffa003ac8b>] ieee80211_config_beacon+0x17b/0x1c0 [mac80211]
[ 1669.801006] [<ffffffffa003ad28>] ieee80211_add_beacon+0x28/0x40 [mac80211]
[ 1669.801068] [<ffffffffa00096b1>] nl80211_addset_beacon+0x181/0x1e0 [cfg80211]
[ 1669.801136] [<ffffffff806b4a76>] genl_rcv_msg+0x1b6/0x1f0
[ 1669.801186] [<ffffffff806b48c0>] ? genl_rcv_msg+0x0/0x1f0
[ 1669.801235] [<ffffffff806b40a9>] netlink_rcv_skb+0x89/0xb0
[ 1669.801286] [<ffffffff806b48a7>] genl_rcv+0x27/0x40
[ 1669.801335] [<ffffffff806b3ab8>] netlink_unicast+0x2a8/0x2c0
[ 1669.801386] [<ffffffff8066744e>] ? __alloc_skb+0x6e/0x160
[ 1669.801436] [<ffffffff806b3cb3>] netlink_sendmsg+0x1e3/0x2e0
[ 1669.801487] [<ffffffff8065e8bf>] sock_sendmsg+0xdf/0x110
[ 1669.801538] [<ffffffff8025a510>] ? autoremove_wake_function+0x0/0x40
[ 1669.801589] [<ffffffff8025a510>] ? autoremove_wake_function+0x0/0x40
[ 1669.801642] [<ffffffff8029212b>] ? find_get_page+0x1b/0xb0
[ 1669.801691] [<ffffffff80292485>] ? find_lock_page+0x25/0x70
[ 1669.801740] [<ffffffff80292b04>] ? filemap_fault+0x144/0x450
[ 1669.801790] [<ffffffff8066da62>] ? __dev_get_by_name+0xa2/0xc0
[ 1669.801841] [<ffffffff8065d8eb>] ? move_addr_to_kernel+0x2b/0x40
[ 1669.801891] [<ffffffff80668a3c>] ? verify_iovec+0x3c/0xd0
[ 1669.801940] [<ffffffff8065ea79>] sys_sendmsg+0x189/0x320
[ 1669.801990] [<ffffffff8065d2d4>] ? sock_destroy_inode+0x14/0x20
[ 1669.802041] [<ffffffff802dc10e>] ? destroy_inode+0x2e/0x60
[ 1669.802091] [<ffffffff802d890a>] ? __d_free+0x3a/0x60
[ 1669.802142] [<ffffffff802dfe7a>] ? mntput_no_expire+0x2a/0x140
[ 1669.802192] [<ffffffff802d89e6>] ? d_kill+0x56/0x70
[ 1669.802242] [<ffffffff802c8521>] ? __fput+0x161/0x1e0
[ 1669.802291] [<ffffffff802c85bd>] ? fput+0x1d/0x30
[ 1669.802340] [<ffffffff802c4d0b>] ? filp_close+0x5b/0x90
[ 1669.802391] [<ffffffff8020b3eb>] system_call_fastpath+0x16/0x1b
[ 1669.802439] ---[ end trace e56b46f2a3c5ff89 ]---
[ 1680.059849] wlan0: no IPv6 routers present

--
Greetings, Michael.


2009-07-30 14:53:42

by Bob Copeland

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
> Ath5k from today's compat-wireless triggers the following WARNing
> on hostapd startup.
> [ 1669.799870] ------------[ cut here ]------------
> [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()

because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
and this is WARN_ON_ONCE(in_irq() || irqs_disabled).

> [ 1669.799982] Hardware name:
> [ 1669.800023] Modules linked in: ath5k mac80211 ath cfg80211
> [ 1669.800192] Pid: 24862, comm: hostapd Not tainted 2.6.30.2 #3
> [ 1669.800238] Call Trace:
> [ 1669.800287] ?[<ffffffff80248e3b>] ? local_bh_enable_ip+0x8b/0xb0
> [ 1669.800340] ?[<ffffffff802432f8>] warn_slowpath_common+0x78/0xd0
> [ 1669.800391] ?[<ffffffff8024335f>] warn_slowpath_null+0xf/0x20
> [ 1669.800441] ?[<ffffffff80248e3b>] local_bh_enable_ip+0x8b/0xb0
> [ 1669.800493] ?[<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
> [ 1669.800564] ?[<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]

I guess this is the first victim of spin_lock_bh conversion?

--
Bob Copeland %% http://www.bobcopeland.com

2009-07-30 15:52:34

by Michael Büsch

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

On Thursday 30 July 2009 17:37:09 Johannes Berg wrote:
> On Thu, 2009-07-30 at 10:45 -0400, Bob Copeland wrote:
> > On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
> > > Ath5k from today's compat-wireless triggers the following WARNing
> > > on hostapd startup.
> > > [ 1669.799870] ------------[ cut here ]------------
> > > [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
> >
> > because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
> > and this is WARN_ON_ONCE(in_irq() || irqs_disabled).
>
> > > [ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
> > > [ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
> >
> > I guess this is the first victim of spin_lock_bh conversion?
>
> Indeed. I think this means we need to convert the local->sta_lock back
> to _irqsave/restore.
>
> John, can you revert the BH patch ("mac80211: do not use irq locks where
> not necessary") and I'll send a new one with those changes removed?

I didn't look at the code, but can't we simply request the beacon from
mac80211 before locking? Or isn't the spin_lock_irqsave() done in the driver?

--
Greetings, Michael.

2009-07-30 15:37:42

by Johannes Berg

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

On Thu, 2009-07-30 at 10:45 -0400, Bob Copeland wrote:
> On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
> > Ath5k from today's compat-wireless triggers the following WARNing
> > on hostapd startup.
> > [ 1669.799870] ------------[ cut here ]------------
> > [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
>
> because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
> and this is WARN_ON_ONCE(in_irq() || irqs_disabled).

> > [ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
> > [ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
>
> I guess this is the first victim of spin_lock_bh conversion?

Indeed. I think this means we need to convert the local->sta_lock back
to _irqsave/restore.

John, can you revert the BH patch ("mac80211: do not use irq locks where
not necessary") and I'll send a new one with those changes removed?

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-07-30 16:08:25

by Bob Copeland

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

On Thu, Jul 30, 2009 at 11:52 AM, Michael Buesch<[email protected]> wrote:
>> John, can you revert the BH patch ("mac80211: do not use irq locks where
>> not necessary") and I'll send a new one with those changes removed?
>
> I didn't look at the code, but can't we simply request the beacon from
> mac80211 before locking? Or isn't the spin_lock_irqsave() done in the driver?
>

We could drop the lock around it, but it'd be nice to keep the option
open here. For example, some people want to move the beacon tasklet
into the hard IRQ - in that case the driver would have to jump through
a lot of hoops to refresh the beacon.

--
Bob Copeland %% http://www.bobcopeland.com

2009-08-04 15:01:03

by John W. Linville

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

On Thu, Jul 30, 2009 at 05:37:09PM +0200, Johannes Berg wrote:
> On Thu, 2009-07-30 at 10:45 -0400, Bob Copeland wrote:
> > On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
> > > Ath5k from today's compat-wireless triggers the following WARNing
> > > on hostapd startup.
> > > [ 1669.799870] ------------[ cut here ]------------
> > > [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
> >
> > because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
> > and this is WARN_ON_ONCE(in_irq() || irqs_disabled).
>
> > > [ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
> > > [ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
> >
> > I guess this is the first victim of spin_lock_bh conversion?
>
> Indeed. I think this means we need to convert the local->sta_lock back
> to _irqsave/restore.
>
> John, can you revert the BH patch ("mac80211: do not use irq locks where
> not necessary") and I'll send a new one with those changes removed?

OK, will be gone today...

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.
?Viva Honduras Libre!

2009-08-06 01:59:18

by Philip Prindeville

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

Philip A. Prindeville wrote:
> Bob Copeland wrote:
>
>> On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
>>
>>
>>> Ath5k from today's compat-wireless triggers the following WARNing
>>> on hostapd startup.
>>> [ 1669.799870] ------------[ cut here ]------------
>>> [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
>>>
>>>
>> because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
>> and this is WARN_ON_ONCE(in_irq() || irqs_disabled).
>>
>>
>>
>>> [ 1669.799982] Hardware name:
>>> [ 1669.800023] Modules linked in: ath5k mac80211 ath cfg80211
>>> [ 1669.800192] Pid: 24862, comm: hostapd Not tainted 2.6.30.2 #3
>>> [ 1669.800238] Call Trace:
>>> [ 1669.800287] [<ffffffff80248e3b>] ? local_bh_enable_ip+0x8b/0xb0
>>> [ 1669.800340] [<ffffffff802432f8>] warn_slowpath_common+0x78/0xd0
>>> [ 1669.800391] [<ffffffff8024335f>] warn_slowpath_null+0xf/0x20
>>> [ 1669.800441] [<ffffffff80248e3b>] local_bh_enable_ip+0x8b/0xb0
>>> [ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
>>> [ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
>>>
>>>
>> I guess this is the first victim of spin_lock_bh conversion?
>>
>>
>>
>
> I just booted with compat-wireless-2009-07-30 built against 2.6.27.26
> and am also seeing:
>
> ------------[ cut here ]------------
> WARNING: at kernel/softirq.c:136 _local_bh_enable_ip+0x2f/0x7c()
> Modules linked in: lm90 hwmon scx200_acb i2c_core bridge stp llc dummy ath5k mac80211 ath cfg80211 rfkill_backport dahdi_dummy dahdi sha512_generic sha256_generic deflate zlib_deflate arc4 ecb sha1_generic blowfish des_generic cbc cryptosoft cryptodev(P) ocf(P) geodewdt geode_rng geode_aes crypto_blkcipher via_rhine rtc
> Pid: 1615, comm: hostapd Tainted: P 2.6.27.26-astlinux #1
> [<c0116739>] warn_on_slowpath+0x40/0x63
> [<c0127c01>] hrtimer_forward+0xe2/0xfe
> [<c01ccf78>] rb_insert_color+0x8c/0xad
> [<c0127d69>] enqueue_hrtimer+0xc8/0xd3
> [<c0112014>] calc_delta_fair+0x16/0x24
> [<c0249cd1>] __alloc_skb+0x4b/0x108
> [<d0920dfb>] ieee80211_beacon_add_tim+0x4f/0x111 [mac80211]
> [<c011a194>] _local_bh_enable_ip+0x2f/0x7c
> [<d0921167>] ieee80211_beacon_get+0xe9/0x262 [mac80211]
> [<d08ed5f5>] ath5k_beacon_update+0x2b/0x1a5 [ath5k]
> [<c02a2cfb>] schedule_timeout+0x13/0x8f
> [<d08ef81a>] ath5k_bss_info_changed+0x118/0x16e [ath5k]
> [<d08ef702>] ath5k_bss_info_changed+0x0/0x16e [ath5k]
> [<d091060d>] ieee80211_bss_info_change_notify+0x141/0x151 [mac80211]
> [<d091bc2e>] ieee80211_config_beacon+0x142/0x153 [mac80211]
> [<d091c0b3>] ieee80211_add_beacon+0x0/0x1c [mac80211]
> [<d08ce6ee>] nl80211_addset_beacon+0x13f/0x171 [cfg80211]
> [<c0262915>] genl_rcv_msg+0x13a/0x154
> [<c02627db>] genl_rcv_msg+0x0/0x154
> [<c026073d>] netlink_rcv_skb+0x2d/0x72
> [<c02621c7>] genl_rcv+0x14/0x17
> [<c0260605>] netlink_unicast+0xd1/0x125
> [<c02613fb>] netlink_sendmsg+0x1ee/0x1fb
> [<c02445ec>] __sock_sendmsg+0x20/0x24
> [<c0245331>] sock_sendmsg+0x95/0xad
> [<c0125714>] autoremove_wake_function+0x0/0x2b
> [<c0112014>] calc_delta_fair+0x16/0x24
> [<c0112266>] __dequeue_entity+0x1f/0x71
> [<c013ab79>] page_count+0x8/0x14
> [<c013aca6>] get_pageblock_flags_group+0xf/0x50
> [<c024b551>] verify_iovec+0x3e/0x6d
> [<c02454d6>] sys_sendmsg+0x18d/0x1ed
> [<c0113a7b>] __wake_up+0x1d/0x45
> [<c0113a93>] __wake_up+0x35/0x45
> [<c0113a7b>] __wake_up+0x1d/0x45
> [<c0113a93>] __wake_up+0x35/0x45
> [<c024dc8e>] dev_name_hash+0x13/0x42
> [<c024dc8e>] dev_name_hash+0x13/0x42
> [<c024dcec>] __dev_get_by_name+0x2f/0x39
> [<c02484a4>] sk_alloc+0x30/0x36
> [<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
> [<c0246dd0>] lock_sock_nested+0xb1/0xb8
> [<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
> [<c0246377>] sys_socketcall+0x15b/0x193
> [<c0152703>] sys_close+0x75/0xc5
> [<c01038b6>] syscall_call+0x7/0xb
> [<c02a0000>] pci_read_bridge_bases+0x273/0x298
> =======================
> ---[ end trace 5a73e54cdc253a36 ]---
>
>
> I'll try again after an update fixing this (backing it out?) gets posted.
>
> BTW: Where does scripts/markup_oops.pl live?
>
> -Philip
>
>
>

Seeing similar issues with 2009-08-04, an AR5413 card, and 2.6.27.26:

------------[ cut here ]------------
WARNING: at kernel/softirq.c:136 _local_bh_enable_ip+0x2f/0x7c()
Modules linked in: lm90 hwmon scx200_acb i2c_core bridge stp llc br2684 solos_pci atm dummy ipv6 dahdi_dummy dahdi sha512_generic sha256_generic deflate zlib_deflate sha1_generic blowfish des_generic cbc cryptosoft cryptodev(P) ocf(P) geodewdt rtc arc4 ecb ath5k mac80211 ath usblp cfg80211 rfkill_backport cs5535_gpio geode_aes crypto_blkcipher via_rhine geode_rng
Pid: 3170, comm: hostapd Tainted: P 2.6.27.26-astlinux #1
[<c0116739>] warn_on_slowpath+0x40/0x63
[<c013b951>] __alloc_pages_internal+0x65/0x324
[<c0112014>] calc_delta_fair+0x16/0x24
[<c0249cd1>] __alloc_skb+0x4b/0x108
[<d08b9dfb>] ieee80211_beacon_add_tim+0x4f/0x111 [mac80211]
[<c011a194>] _local_bh_enable_ip+0x2f/0x7c
[<d08ba167>] ieee80211_beacon_get+0xe9/0x262 [mac80211]
[<d08865f5>] ath5k_beacon_update+0x2b/0x1a5 [ath5k]
[<c02a2cfb>] schedule_timeout+0x13/0x8f
[<d088881a>] ath5k_bss_info_changed+0x118/0x16e [ath5k]
[<d0888702>] ath5k_bss_info_changed+0x0/0x16e [ath5k]
[<d08a960d>] ieee80211_bss_info_change_notify+0x141/0x151 [mac80211]
[<d08b4c2e>] ieee80211_config_beacon+0x142/0x153 [mac80211]
[<d08b50b3>] ieee80211_add_beacon+0x0/0x1c [mac80211]
[<d08676fa>] nl80211_addset_beacon+0x13f/0x171 [cfg80211]
[<c0262915>] genl_rcv_msg+0x13a/0x154
[<c02627db>] genl_rcv_msg+0x0/0x154
[<c026073d>] netlink_rcv_skb+0x2d/0x72
[<c02621c7>] genl_rcv+0x14/0x17
[<c0260605>] netlink_unicast+0xd1/0x125
[<c02613fb>] netlink_sendmsg+0x1ee/0x1fb
[<c02445ec>] __sock_sendmsg+0x20/0x24
[<c0245331>] sock_sendmsg+0x95/0xad
[<c0125714>] autoremove_wake_function+0x0/0x2b
[<c0125714>] autoremove_wake_function+0x0/0x2b
[<c0113a7b>] __wake_up+0x1d/0x45
[<c0113a93>] __wake_up+0x35/0x45
[<c025f957>] netlink_unlock_table+0x23/0x25
[<c024b551>] verify_iovec+0x3e/0x6d
[<c02454d6>] sys_sendmsg+0x18d/0x1ed
[<c013dbeb>] mark_page_accessed+0x35/0x45
[<c014e6ff>] shmem_fault+0x62/0x6e
[<c01b5f80>] unionfs_fault+0x48/0x50
[<c024dc8e>] dev_name_hash+0x13/0x42
[<c024dc8e>] dev_name_hash+0x13/0x42
[<c024dcec>] __dev_get_by_name+0x2f/0x39
[<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
[<c0246dd0>] lock_sock_nested+0xb1/0xb8
[<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
[<c0246377>] sys_socketcall+0x15b/0x193
[<c0152703>] sys_close+0x75/0xc5
[<c01038b6>] syscall_call+0x7/0xb
[<c02a0000>] pci_read_bridge_bases+0x273/0x298
=======================
---[ end trace c32282ee6886491c ]---



Who's working on the beaconing interrupts (vs. tasklet) stuff?

-Philip



2009-07-31 22:47:49

by Philip Prindeville

[permalink] [raw]
Subject: Re: Ath5k/mac80211 triggers WARN_ON in kernel/softirq.c

Bob Copeland wrote:
> On Thu, Jul 30, 2009 at 10:31 AM, Michael Buesch<[email protected]> wrote:
>
>> Ath5k from today's compat-wireless triggers the following WARNing
>> on hostapd startup.
>> [ 1669.799870] ------------[ cut here ]------------
>> [ 1669.799934] WARNING: at kernel/softirq.c:141 local_bh_enable_ip+0x8b/0xb0()
>>
>
> because ath5k calls ieee80211_beacon_get inside a spin_lock_irqsave()
> and this is WARN_ON_ONCE(in_irq() || irqs_disabled).
>
>
>> [ 1669.799982] Hardware name:
>> [ 1669.800023] Modules linked in: ath5k mac80211 ath cfg80211
>> [ 1669.800192] Pid: 24862, comm: hostapd Not tainted 2.6.30.2 #3
>> [ 1669.800238] Call Trace:
>> [ 1669.800287] [<ffffffff80248e3b>] ? local_bh_enable_ip+0x8b/0xb0
>> [ 1669.800340] [<ffffffff802432f8>] warn_slowpath_common+0x78/0xd0
>> [ 1669.800391] [<ffffffff8024335f>] warn_slowpath_null+0xf/0x20
>> [ 1669.800441] [<ffffffff80248e3b>] local_bh_enable_ip+0x8b/0xb0
>> [ 1669.800493] [<ffffffff807e0fef>] _spin_unlock_bh+0xf/0x20
>> [ 1669.800564] [<ffffffffa0040b92>] ieee80211_beacon_get+0x2c2/0x2d0 [mac80211]
>>
>
> I guess this is the first victim of spin_lock_bh conversion?
>
>

I just booted with compat-wireless-2009-07-30 built against 2.6.27.26
and am also seeing:

------------[ cut here ]------------
WARNING: at kernel/softirq.c:136 _local_bh_enable_ip+0x2f/0x7c()
Modules linked in: lm90 hwmon scx200_acb i2c_core bridge stp llc dummy ath5k mac80211 ath cfg80211 rfkill_backport dahdi_dummy dahdi sha512_generic sha256_generic deflate zlib_deflate arc4 ecb sha1_generic blowfish des_generic cbc cryptosoft cryptodev(P) ocf(P) geodewdt geode_rng geode_aes crypto_blkcipher via_rhine rtc
Pid: 1615, comm: hostapd Tainted: P 2.6.27.26-astlinux #1
[<c0116739>] warn_on_slowpath+0x40/0x63
[<c0127c01>] hrtimer_forward+0xe2/0xfe
[<c01ccf78>] rb_insert_color+0x8c/0xad
[<c0127d69>] enqueue_hrtimer+0xc8/0xd3
[<c0112014>] calc_delta_fair+0x16/0x24
[<c0249cd1>] __alloc_skb+0x4b/0x108
[<d0920dfb>] ieee80211_beacon_add_tim+0x4f/0x111 [mac80211]
[<c011a194>] _local_bh_enable_ip+0x2f/0x7c
[<d0921167>] ieee80211_beacon_get+0xe9/0x262 [mac80211]
[<d08ed5f5>] ath5k_beacon_update+0x2b/0x1a5 [ath5k]
[<c02a2cfb>] schedule_timeout+0x13/0x8f
[<d08ef81a>] ath5k_bss_info_changed+0x118/0x16e [ath5k]
[<d08ef702>] ath5k_bss_info_changed+0x0/0x16e [ath5k]
[<d091060d>] ieee80211_bss_info_change_notify+0x141/0x151 [mac80211]
[<d091bc2e>] ieee80211_config_beacon+0x142/0x153 [mac80211]
[<d091c0b3>] ieee80211_add_beacon+0x0/0x1c [mac80211]
[<d08ce6ee>] nl80211_addset_beacon+0x13f/0x171 [cfg80211]
[<c0262915>] genl_rcv_msg+0x13a/0x154
[<c02627db>] genl_rcv_msg+0x0/0x154
[<c026073d>] netlink_rcv_skb+0x2d/0x72
[<c02621c7>] genl_rcv+0x14/0x17
[<c0260605>] netlink_unicast+0xd1/0x125
[<c02613fb>] netlink_sendmsg+0x1ee/0x1fb
[<c02445ec>] __sock_sendmsg+0x20/0x24
[<c0245331>] sock_sendmsg+0x95/0xad
[<c0125714>] autoremove_wake_function+0x0/0x2b
[<c0112014>] calc_delta_fair+0x16/0x24
[<c0112266>] __dequeue_entity+0x1f/0x71
[<c013ab79>] page_count+0x8/0x14
[<c013aca6>] get_pageblock_flags_group+0xf/0x50
[<c024b551>] verify_iovec+0x3e/0x6d
[<c02454d6>] sys_sendmsg+0x18d/0x1ed
[<c0113a7b>] __wake_up+0x1d/0x45
[<c0113a93>] __wake_up+0x35/0x45
[<c0113a7b>] __wake_up+0x1d/0x45
[<c0113a93>] __wake_up+0x35/0x45
[<c024dc8e>] dev_name_hash+0x13/0x42
[<c024dc8e>] dev_name_hash+0x13/0x42
[<c024dcec>] __dev_get_by_name+0x2f/0x39
[<c02484a4>] sk_alloc+0x30/0x36
[<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
[<c0246dd0>] lock_sock_nested+0xb1/0xb8
[<c011a1d7>] _local_bh_enable_ip+0x72/0x7c
[<c0246377>] sys_socketcall+0x15b/0x193
[<c0152703>] sys_close+0x75/0xc5
[<c01038b6>] syscall_call+0x7/0xb
[<c02a0000>] pci_read_bridge_bases+0x273/0x298
=======================
---[ end trace 5a73e54cdc253a36 ]---


I'll try again after an update fixing this (backing it out?) gets posted.

BTW: Where does scripts/markup_oops.pl live?

-Philip