scheduling while atomic: br2684ctl (atm)
Subsystems (3)
Hi all,
I get the following message apparently every time (on 2.6.36-rc4+ at least) when killing any old br2684ctl processes. "unregister_atmdevice_notifier" was added by7313bb8f ("atm: propagate signal changes via notifier") so perhaps the unregister
part was not tested properly for rcu interaction?
So far I haven't noticed any ill effects from the message. Let me know if I should test something. Thanks.
Mikko
[29874.827053] PM: restore of devices complete after 3623.342 msecs [29874.827053] wlan0: Trigger new scan to find an IBSS to join [29875.020370] wlan0: Creating new IBSS network, BSSID 8a:4c:35:ef:eb:6b [29875.613701] wlan0: no IPv6 routers present [29876.027033] nas0: no IPv6 routers present [29876.831216] cxacru 3-1:1.0: receive of cm 0x90 failed (-104) [29876.844328] r8169 0000:09:00.0: PME# enabled [29876.878731] snapshot_ioctl: ioctl '4004330c' is deprecated and will be removed soon, update your suspend-to-disk utilities [29876.878741] Restarting tasks ... done. [29876.903718] PM: Basic memory bitmaps freed [29876.903718] video LNXVIDEO:01: Restoring backlight state [29879.703963] cxacru 3-1:1.0: found firmware cxacru-fw.bin [29879.708273] cxacru 3-1:1.0: loading firmware [29881.277932] cxacru 3-1:1.0: starting device [29882.346357] cxacru0: ADSL USB MODEM (usb-0000:00:12.0-1) 00:04:ed:09:1e:5a [29882.362575] ATM dev 0: ADSL state: running [29882.362593] ATM dev 0: ADSL line: down [29882.580484] BUG: scheduling while atomic: br2684ctl/28543/0x00000002 [29882.580498] Modules linked in: nls_cp437 vfat fat usb_storage cpufreq_stats
iptable_filter ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables br2684 ipv6 sco bnep l2cap bluetooth ext2 cxacru arc4 ecb usbatm atm uvcvideo videodev v4l1_compat v4l2_compat_ioctl32 snd_seq_dummy snd_seq_oss snd_hda_codec_atihdmi snd_seq_midi_event snd_hda_codec_idt snd_seq snd_seq_device ath5k snd_hda_intel snd_pcm_oss snd_hda_codec snd_mixer_oss mac80211 joydev ath snd_hwdep snd_pcm video ohci_hcd hp_wmi output snd_timer cfg80211 ehci_hcd hp_accel lis3lv02d battery rfkill input_polldev snd wmi thermal ohci1394 psmouse jmb38x_ms pcspkr ac edac_core i2c_piix4 sg soundcore usbcore snd_page_alloc button serio_raw evdev memstick powernow_k8 led_class r8169 processor k10temp mii ieee1394 mperf rtc_cmos rtc_core rtc_lib ext4 mbcache jbd2 crc16 sr_mod cdrom sd_mod ahci libahci pata_atiixp pata_acpi libata scsi_mod radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: mmc_core]
[29882.580796] Pid: 28543, comm: br2684ctl Not tainted 2.6.36-rc4-CUST-00214-g2422084 #49 [29882.580808] Call Trace: [29882.580845] [<ffffffff8103cfd1>] __schedule_bug+0x61/0x70 [29882.580865] [<ffffffff8131202e>] schedule+0x8de/0xa90 [29882.580882] [<ffffffff81312745>] schedule_timeout+0x215/0x350 [29882.580900] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120 [29882.580924] [<ffffffff81080722>] ? smp_call_function_single+0x172/0x190 [29882.580937] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120 [29882.580951] [<ffffffff81311610>] wait_for_common+0xc0/0x150 [29882.580968] [<ffffffff81046050>] ? default_wake_function+0x0/0x10 [29882.580985] [<ffffffff81311748>] wait_for_completion+0x18/0x20 [29882.581004] [<ffffffff810a95d6>] synchronize_rcu+0x46/0x50 [29882.581025] [<ffffffff810683a0>] ? wakeme_after_rcu+0x0/0x10 [29882.581051] [<ffffffff81070eb0>] atomic_notifier_chain_unregister+0x60/0x80 [29882.581083] [<ffffffffa050ddc3>] unregister_atmdevice_notifier+0x13/0x20 [atm] [29882.581102] [<ffffffffa05d588d>] br2684_push+0x2bd/0x320 [br2684] [29882.581124] [<ffffffffa050e2f6>] vcc_release+0x76/0x130 [atm] [29882.581142] [<ffffffff8126ef94>] sock_release+0x24/0x90 [29882.581155] [<ffffffff8126f012>] sock_close+0x12/0x30 [29882.581174] [<ffffffff8110c5c5>] fput+0xd5/0x230 [29882.581188] [<ffffffff81108edb>] filp_close+0x5b/0x80 [29882.581207] [<ffffffff8104ee67>] put_files_struct+0x97/0x100 [29882.581221] [<ffffffff8104ef8d>] exit_files+0x4d/0x60 [29882.581234] [<ffffffff8104f118>] do_exit+0x178/0x810 [29882.581256] [<ffffffff8100cc9c>] ? fpu_finit+0x1c/0x30 [29882.581270] [<ffffffff8104fa3f>] do_group_exit+0x4f/0xb0 [29882.581283] [<ffffffff8104fab2>] sys_exit_group+0x12/0x20 [29882.581300] [<ffffffff81002e82>] system_call_fastpath+0x16/0x1b [29883.353415] ATM dev 0: ADSL line: initializing [29884.359446] ATM dev 0: ADSL line: down [29887.862669] ata3.00: configured for UDMA/100 [29887.862688] ata3: EH complete
Quoted 6 lines · On Wed, 22 Sep 2010 00:42:29 -0700 (PDT) Mikko Vinni <[email protected]> wrote:
I get the following message apparently every time (on 2.6.36-rc4+ at least) when killing any old br2684ctl processes. "
unregister_atmdevice_notifier" was added by7313bb8f("atm: propagate signal changes via notifier") so perhaps the unregister
part was not tested properly for rcu interaction?
it looks like atomic_notifier_chain_unregister() cannot be called in an atomic context. the only reason there is a lock is to the list of br2684_devs atomically. however, i think the event handler could be made to just register/unregister on module load/unload instead.
Quoted 2 lines
So far I haven't noticed any ill effects from the message. Let me know if I should test something. Thanks.
it isnt good. it should be fixed. unless someone has a better idea i will go ahead with the above.
Quoted 8 lines · Mikko Vinni
Hi all,
I get the following message apparently every time (on 2.6.36-rc4+ at least) when killing any old br2684ctl processes. "
unregister_atmdevice_notifier" was added by7313bb8f("atm: propagate signal changes via notifier") so perhaps the unregister
part was not tested properly for rcu interaction?
This complaint will happen when you call synchronize_rcu() while in some context where it is illegal to block, for example, if irqs are disabled or if a spinlock is held. I don't see commit 7313bb8f, but perhaps unregister_atmdevice_notifier() is holding a spinlock across the call to atomic_notifier_chain_unregister()?
Thanx, Paul
Quoted 81 lines
So far I haven't noticed any ill effects from the message. Let me know if I should test something. Thanks.
Mikko
[29874.827053] PM: restore of devices complete after 3623.342 msecs [29874.827053] wlan0: Trigger new scan to find an IBSS to join [29875.020370] wlan0: Creating new IBSS network, BSSID 8a:4c:35:ef:eb:6b [29875.613701] wlan0: no IPv6 routers present [29876.027033] nas0: no IPv6 routers present [29876.831216] cxacru 3-1:1.0: receive of cm 0x90 failed (-104) [29876.844328] r8169 0000:09:00.0: PME# enabled [29876.878731] snapshot_ioctl: ioctl '4004330c' is deprecated and will be removed soon, update your suspend-to-disk utilities [29876.878741] Restarting tasks ... done. [29876.903718] PM: Basic memory bitmaps freed [29876.903718] video LNXVIDEO:01: Restoring backlight state [29879.703963] cxacru 3-1:1.0: found firmware cxacru-fw.bin [29879.708273] cxacru 3-1:1.0: loading firmware [29881.277932] cxacru 3-1:1.0: starting device [29882.346357] cxacru0: ADSL USB MODEM (usb-0000:00:12.0-1) 00:04:ed:09:1e:5a [29882.362575] ATM dev 0: ADSL state: running [29882.362593] ATM dev 0: ADSL line: down [29882.580484] BUG: scheduling while atomic: br2684ctl/28543/0x00000002 [29882.580498] Modules linked in: nls_cp437 vfat fat usb_storage cpufreq_stats
iptable_filteript_MASQUERADEiptable_natnf_natnf_conntrack_ipv4nf_conntracknf_defrag_ipv4ip_tablesx_tablesbr2684 ipv6 sco bnep l2cap bluetooth ext2 cxacru arc4 ecb usbatm atm uvcvideo videodevv4l1_compatv4l2_compat_ioctl32snd_seq_dummysnd_seq_osssnd_hda_codec_atihdmisnd_seq_midi_eventsnd_hda_codec_idtsnd_seqsnd_seq_deviceath5ksnd_hda_intelsnd_pcm_osssnd_hda_codecsnd_mixer_ossmac80211 joydev athsnd_hwdepsnd_pcmvideoohci_hcdhp_wmioutputsnd_timercfg80211ehci_hcdhp_accellis3lv02d battery rfkillinput_polldevsnd wmi thermal ohci1394 psmousejmb38x_mspcspkr acedac_corei2c_piix4sg soundcore usbcoresnd_page_allocbuttonserio_rawevdev memstickpowernow_k8led_classr8169 processor k10temp mii ieee1394 mperfrtc_cmosrtc_corertc_libext4 mbcache jbd2 crc16sr_modcdromsd_modahci libahcipata_atiixppata_acpilibatascsi_modradeon ttmdrm_kms_helperdrmi2c_algo_biti2c_core[last unloaded:mmc_core][29882.580796] Pid: 28543, comm: br2684ctl Not tainted 2.6.36-rc4-CUST-00214-g2422084 #49 [29882.580808] Call Trace: [29882.580845] [<ffffffff8103cfd1>] __schedule_bug+0x61/0x70 [29882.580865] [<ffffffff8131202e>] schedule+0x8de/0xa90 [29882.580882] [<ffffffff81312745>] schedule_timeout+0x215/0x350 [29882.580900] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120 [29882.580924] [<ffffffff81080722>] ? smp_call_function_single+0x172/0x190 [29882.580937] [<ffffffff8127f470>] ? flush_backlog+0x0/0x120 [29882.580951] [<ffffffff81311610>] wait_for_common+0xc0/0x150 [29882.580968] [<ffffffff81046050>] ? default_wake_function+0x0/0x10 [29882.580985] [<ffffffff81311748>] wait_for_completion+0x18/0x20 [29882.581004] [<ffffffff810a95d6>] synchronize_rcu+0x46/0x50 [29882.581025] [<ffffffff810683a0>] ? wakeme_after_rcu+0x0/0x10 [29882.581051] [<ffffffff81070eb0>] atomic_notifier_chain_unregister+0x60/0x80 [29882.581083] [<ffffffffa050ddc3>] unregister_atmdevice_notifier+0x13/0x20 [atm] [29882.581102] [<ffffffffa05d588d>] br2684_push+0x2bd/0x320 [br2684] [29882.581124] [<ffffffffa050e2f6>] vcc_release+0x76/0x130 [atm] [29882.581142] [<ffffffff8126ef94>] sock_release+0x24/0x90 [29882.581155] [<ffffffff8126f012>] sock_close+0x12/0x30 [29882.581174] [<ffffffff8110c5c5>] fput+0xd5/0x230 [29882.581188] [<ffffffff81108edb>] filp_close+0x5b/0x80 [29882.581207] [<ffffffff8104ee67>] put_files_struct+0x97/0x100 [29882.581221] [<ffffffff8104ef8d>] exit_files+0x4d/0x60 [29882.581234] [<ffffffff8104f118>] do_exit+0x178/0x810 [29882.581256] [<ffffffff8100cc9c>] ? fpu_finit+0x1c/0x30 [29882.581270] [<ffffffff8104fa3f>] do_group_exit+0x4f/0xb0 [29882.581283] [<ffffffff8104fab2>] sys_exit_group+0x12/0x20 [29882.581300] [<ffffffff81002e82>] system_call_fastpath+0x16/0x1b [29883.353415] ATM dev 0: ADSL line: initializing [29884.359446] ATM dev 0: ADSL line: down [29887.862669] ata3.00: configured for UDMA/100 [29887.862688] ata3: EH complete--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
PATCH 1/1 br2684: fix scheduling while atomic
In reply to chas williams - CONTRACTORYou can't call atomic_notifier_chain_unregister() while in atomic context.
Fix, call un/register_atmdevice_notifier in module __init and __exit.
Bug report:
http://comments.gmane.org/gmane.linux.network/172603
--- net/atm/br2684.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)
net/atm/br2684.c +2 -10
@@ -399,12 +399,6 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)unregister_netdev (net_dev);free_netdev (net_dev); } -read_lock_irq (&devs_lock); -if (list_empty (&br2684_devs)) { -/* last br2684 device */ -unregister_atmdevice_notifier (&atm_dev_notifier); - } -read_unlock_irq (&devs_lock);return ; }
@@ -675,7 +669,6 @@ static int br2684_create(void __user *arg)if (list_empty (&br2684_devs)) {/* 1st br2684 device */ -register_atmdevice_notifier (&atm_dev_notifier); brdev->number =1 ; }else brdev->number =BRPRIV (list_entry_brdev (br2684_devs.prev))->number +1 ;
@@ -815,6 +808,7 @@ static int __init br2684_init(void)return -ENOMEM ;#endif register_atm_ioctl (&br2684_ioctl_ops); +register_atmdevice_notifier (&atm_dev_notifier);return 0 ; }
@@ -830,9 +824,7 @@ static void __exit br2684_exit(void)#endif -/* if not already empty */ -if (!list_empty (&br2684_devs)) -unregister_atmdevice_notifier (&atm_dev_notifier); +unregister_atmdevice_notifier (&atm_dev_notifier);while (!list_empty (&br2684_devs)) { net_dev =list_entry_brdev (br2684_devs.next);
Signature · 1 line
1.7.2.2
Re: [PATCH] br2684: fix scheduling while atomic
From: Karl Hiramoto <[email protected]>
Quoted 10 lines
Subject: [PATCH] br2684: fix scheduling while atomic
You can't call
atomic_notifier_chain_unregister()while in atomic context.Fix, call un/register_atmdevice_notifier in module
__initand__exit.Bug report:
http://comments.gmane.org/gmane.linux.network/172603Signed-off-by Karl Hiramoto <[email protected]>
Feel free to add
Seems to be fixed as advertized, i.e., nothing suspicious appeared in the logs when opening/closing connection, killing br2684ctl, or loading/unloading the br2684 module.
Thanks
Mikko
Quoted 6 lines
--- net/atm/br2684.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-)net/atm/br2684.c +0
-0
Re: [PATCH] br2684: fix scheduling while atomic
From: Mikko Vinni <[email protected]>
Date: Thu, 23 Sep 2010 09:51:24 -0700 (PDT)
Quoted 7 lines
From: Karl Hiramoto <[email protected]>
Quoted 6 lines
Subject: [PATCH] br2684: fix scheduling while atomic
You can't call
atomic_notifier_chain_unregister()while in atomic context.Fix, call un/register_atmdevice_notifier in module
__initand__exit.
Quoted 8 lines
Quoted 4 lines
Bug report:
http://comments.gmane.org/gmane.linux.network/172603Signed-off-by Karl Hiramoto <[email protected]>Feel free to add
Reported-and-tested-by Mikko Vinni <[email protected]>
Applied, thanks guys.