* [2.6.5] Bad scheduling while atomic
@ 2004-04-16 15:51 Paul Rolland
2004-04-16 20:16 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: Paul Rolland @ 2004-04-16 15:51 UTC (permalink / raw)
To: linux-kernel; +Cc: rol
Hello,
I have these in my logs :
bad: scheduling while atomic!
Call Trace:
[<c011aa54>] schedule+0x59e/0x5a4
[<c0118575>] pte_alloc_one+0x55/0x68
[<c011ad6d>] wait_for_completion+0x91/0xe6
[<c011aaaa>] default_wake_function+0x0/0x12
[<c011aaaa>] default_wake_function+0x0/0x12
[<c012dc05>] synchronize_kernel+0x31/0x3c
[<c012dbca>] wakeme_after_rcu+0x0/0xa
[<c04131ef>] unregister_netdevice+0x141/0x27a
[<c0419f8b>] rtmsg_ifinfo+0x91/0xda
[<c03316c8>] lapbeth_device_event+0xa6/0xf0
[<c0129dc5>] notifier_call_chain+0x27/0x3e
[<c041320f>] unregister_netdevice+0x161/0x27a
[<c0330cf2>] tun_chr_close+0xe8/0xf2
[<c0330c0a>] tun_chr_close+0x0/0xf2
[<c0153340>] __fput+0x120/0x132
[<c015199b>] filp_close+0x59/0x86
[<c0151a2c>] sys_close+0x64/0x98
[<c0108b17>] syscall_call+0x7/0xb
Any other info that could help someone ?
Regards,
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6.5] Bad scheduling while atomic
2004-04-16 15:51 [2.6.5] Bad scheduling while atomic Paul Rolland
@ 2004-04-16 20:16 ` Stephen Hemminger
2004-04-16 21:56 ` David S. Miller
2004-04-18 18:50 ` Paul Rolland
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2004-04-16 20:16 UTC (permalink / raw)
To: David S. Miller; +Cc: Paul Rolland, linux-kernel, netdev
Bring up/down network devices with lapbether causes scheduling while
atomic (if preempt enabled).
The calls to rcu_read_lock are unnecessary since lapb_device_event
is called from notifier with the rtnetlink semaphore held, it is
already protected from the labp_devices list changing.
Patch against 2.6.6-rc1
diff -Nru a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
--- a/drivers/net/wan/lapbether.c Fri Apr 16 11:00:35 2004
+++ b/drivers/net/wan/lapbether.c Fri Apr 16 11:00:35 2004
@@ -392,6 +392,8 @@
/*
* Handle device status changes.
+ *
+ * Called from notifier with RTNL held.
*/
static int lapbeth_device_event(struct notifier_block *this,
unsigned long event, void *ptr)
@@ -402,7 +404,6 @@
if (!dev_is_ethdev(dev))
return NOTIFY_DONE;
- rcu_read_lock();
switch (event) {
case NETDEV_UP:
/* New ethernet device -> new LAPB interface */
@@ -422,7 +423,6 @@
lapbeth_free_device(lapbeth);
break;
}
- rcu_read_unlock();
return NOTIFY_DONE;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [2.6.5] Bad scheduling while atomic
2004-04-16 20:16 ` Stephen Hemminger
@ 2004-04-16 21:56 ` David S. Miller
2004-04-18 18:50 ` Paul Rolland
1 sibling, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-04-16 21:56 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: rol, linux-kernel, netdev
On Fri, 16 Apr 2004 13:16:33 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> Bring up/down network devices with lapbether causes scheduling while
> atomic (if preempt enabled).
>
> The calls to rcu_read_lock are unnecessary since lapb_device_event
> is called from notifier with the rtnetlink semaphore held, it is
> already protected from the labp_devices list changing.
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [2.6.5] Bad scheduling while atomic
2004-04-16 20:16 ` Stephen Hemminger
2004-04-16 21:56 ` David S. Miller
@ 2004-04-18 18:50 ` Paul Rolland
1 sibling, 0 replies; 4+ messages in thread
From: Paul Rolland @ 2004-04-18 18:50 UTC (permalink / raw)
To: 'Stephen Hemminger', 'David S. Miller'
Cc: 'Paul Rolland', linux-kernel, netdev
Thanks Stephen for being so fast !
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
> -----Message d'origine-----
> De : linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] De la part de
> Stephen Hemminger
> Envoyé : vendredi 16 avril 2004 22:17
> À : David S. Miller
> Cc : Paul Rolland; linux-kernel@vger.kernel.org; netdev@oss.sgi.com
> Objet : Re: [2.6.5] Bad scheduling while atomic
>
> Bring up/down network devices with lapbether causes scheduling while
> atomic (if preempt enabled).
>
> The calls to rcu_read_lock are unnecessary since lapb_device_event
> is called from notifier with the rtnetlink semaphore held, it is
> already protected from the labp_devices list changing.
>
> Patch against 2.6.6-rc1
>
> diff -Nru a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
> --- a/drivers/net/wan/lapbether.c Fri Apr 16 11:00:35 2004
> +++ b/drivers/net/wan/lapbether.c Fri Apr 16 11:00:35 2004
> @@ -392,6 +392,8 @@
>
> /*
> * Handle device status changes.
> + *
> + * Called from notifier with RTNL held.
> */
> static int lapbeth_device_event(struct notifier_block *this,
> unsigned long event, void *ptr)
> @@ -402,7 +404,6 @@
> if (!dev_is_ethdev(dev))
> return NOTIFY_DONE;
>
> - rcu_read_lock();
> switch (event) {
> case NETDEV_UP:
> /* New ethernet device -> new LAPB interface */
> @@ -422,7 +423,6 @@
> lapbeth_free_device(lapbeth);
> break;
> }
> - rcu_read_unlock();
>
> return NOTIFY_DONE;
> }
> -
> 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] 4+ messages in thread
end of thread, other threads:[~2004-04-18 18:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-16 15:51 [2.6.5] Bad scheduling while atomic Paul Rolland
2004-04-16 20:16 ` Stephen Hemminger
2004-04-16 21:56 ` David S. Miller
2004-04-18 18:50 ` Paul Rolland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®