summaryrefslogtreecommitdiffstats
path: root/drivers/net/dummy.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-06-10 21:11:57 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-11 01:12:04 -0700
commit16b0dc29c1af9df341428f4c49ada4f626258082 (patch)
tree489edb6c490de6e3ef349dc3d4e8b0a5d726d161 /drivers/net/dummy.c
parentc5d21c4b2a7765ab0600c8426374b50eb9f4a36f (diff)
downloadop-kernel-dev-16b0dc29c1af9df341428f4c49ada4f626258082.zip
op-kernel-dev-16b0dc29c1af9df341428f4c49ada4f626258082.tar.gz
dummy: fix rcu_sched self-detected stalls
Trying to "modprobe dummy numdummies=30000" triggers : INFO: rcu_sched self-detected stall on CPU { 8} (t=60000 jiffies) After this splat, RTNL is locked and reboot is needed. We must call cond_resched() to avoid this, even holding RTNL. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dummy.c')
-rw-r--r--drivers/net/dummy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 442d91a..bab0158 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -187,8 +187,10 @@ static int __init dummy_init_module(void)
rtnl_lock();
err = __rtnl_link_register(&dummy_link_ops);
- for (i = 0; i < numdummies && !err; i++)
+ for (i = 0; i < numdummies && !err; i++) {
err = dummy_init_one();
+ cond_resched();
+ }
if (err < 0)
__rtnl_link_unregister(&dummy_link_ops);
rtnl_unlock();
OpenPOWER on IntegriCloud