* scheduling while atomic: br2684ctl (atm)
@ 2010-09-22 7:42 Mikko Vinni
2010-09-22 18:43 ` chas williams - CONTRACTOR
2010-09-22 21:54 ` scheduling while atomic: br2684ctl (atm) Paul E. McKenney
0 siblings, 2 replies; 6+ messages in thread
From: Mikko Vinni @ 2010-09-22 7:42 UTC (permalink / raw)
To: Karl Hiramoto
Cc: David S. Miller, Chas Williams - CONTRACTOR, netdev, linux-kernel
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
by
7313bb8f ("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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: scheduling while atomic: br2684ctl (atm)
2010-09-22 7:42 scheduling while atomic: br2684ctl (atm) Mikko Vinni
@ 2010-09-22 18:43 ` chas williams - CONTRACTOR
2010-09-23 11:50 ` [PATCH] br2684: fix scheduling while atomic Karl Hiramoto
2010-09-22 21:54 ` scheduling while atomic: br2684ctl (atm) Paul E. McKenney
1 sibling, 1 reply; 6+ messages in thread
From: chas williams - CONTRACTOR @ 2010-09-22 18:43 UTC (permalink / raw)
To: Mikko Vinni; +Cc: Karl Hiramoto, David S. Miller, netdev, linux-kernel
On Wed, 22 Sep 2010 00:42:29 -0700 (PDT)
Mikko Vinni <mmvinni@yahoo.com> 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 by
> 7313bb8f ("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.
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] br2684: fix scheduling while atomic
2010-09-22 18:43 ` chas williams - CONTRACTOR
@ 2010-09-23 11:50 ` Karl Hiramoto
2010-09-23 16:51 ` Mikko Vinni
0 siblings, 1 reply; 6+ messages in thread
From: Karl Hiramoto @ 2010-09-23 11:50 UTC (permalink / raw)
To: netdev, mmvinni; +Cc: davem, chas, Karl Hiramoto
You 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
Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
---
net/atm/br2684.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 651babd..ad2b232 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -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);
--
1.7.2.2
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] br2684: fix scheduling while atomic
2010-09-23 11:50 ` [PATCH] br2684: fix scheduling while atomic Karl Hiramoto
@ 2010-09-23 16:51 ` Mikko Vinni
2010-09-27 1:29 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Mikko Vinni @ 2010-09-23 16:51 UTC (permalink / raw)
To: Karl Hiramoto, netdev; +Cc: davem, chas, Karl Hiramoto
From: Karl Hiramoto <karl@hiramoto.org>
> 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 __init and __exit.
>
> Bug report:
> http://comments.gmane.org/gmane.linux.network/172603
>
> Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Feel free to add
Reported-and-tested-by: Mikko Vinni <mmvinni@yahoo.com>
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
> ---
> net/atm/br2684.c | 12 ++----------
> 1 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/net/atm/br2684.c b/net/atm/br2684.c
> index 651babd..ad2b232 100644
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] br2684: fix scheduling while atomic
2010-09-23 16:51 ` Mikko Vinni
@ 2010-09-27 1:29 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-09-27 1:29 UTC (permalink / raw)
To: mmvinni; +Cc: karl, netdev, chas
From: Mikko Vinni <mmvinni@yahoo.com>
Date: Thu, 23 Sep 2010 09:51:24 -0700 (PDT)
> From: Karl Hiramoto <karl@hiramoto.org>
>> 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 __init and __exit.
>>
>> Bug report:
>> http://comments.gmane.org/gmane.linux.network/172603
>>
>> Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
>
> Feel free to add
>
> Reported-and-tested-by: Mikko Vinni <mmvinni@yahoo.com>
Applied, thanks guys.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: scheduling while atomic: br2684ctl (atm)
2010-09-22 7:42 scheduling while atomic: br2684ctl (atm) Mikko Vinni
2010-09-22 18:43 ` chas williams - CONTRACTOR
@ 2010-09-22 21:54 ` Paul E. McKenney
1 sibling, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2010-09-22 21:54 UTC (permalink / raw)
To: Mikko Vinni
Cc: Karl Hiramoto, David S. Miller, Chas Williams - CONTRACTOR,
netdev, linux-kernel
On Wed, Sep 22, 2010 at 12:42:29AM -0700, Mikko Vinni wrote:
> 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
> by
> 7313bb8f ("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
> 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
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-27 1:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-22 7:42 scheduling while atomic: br2684ctl (atm) Mikko Vinni
2010-09-22 18:43 ` chas williams - CONTRACTOR
2010-09-23 11:50 ` [PATCH] br2684: fix scheduling while atomic Karl Hiramoto
2010-09-23 16:51 ` Mikko Vinni
2010-09-27 1:29 ` David Miller
2010-09-22 21:54 ` scheduling while atomic: br2684ctl (atm) Paul E. McKenney
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).