diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-10 17:11:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-11 04:12:04 -0400 |
commit | 16b0dc29c1af9df341428f4c49ada4f626258082 (patch) | |
tree | 489edb6c490de6e3ef349dc3d4e8b0a5d726d161 | |
parent | c5d21c4b2a7765ab0600c8426374b50eb9f4a36f (diff) |
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>
-rw-r--r-- | drivers/net/dummy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index 442d91a2747b..bab0158f1cc3 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c | |||
@@ -187,8 +187,10 @@ static int __init dummy_init_module(void) | |||
187 | rtnl_lock(); | 187 | rtnl_lock(); |
188 | err = __rtnl_link_register(&dummy_link_ops); | 188 | err = __rtnl_link_register(&dummy_link_ops); |
189 | 189 | ||
190 | for (i = 0; i < numdummies && !err; i++) | 190 | for (i = 0; i < numdummies && !err; i++) { |
191 | err = dummy_init_one(); | 191 | err = dummy_init_one(); |
192 | cond_resched(); | ||
193 | } | ||
192 | if (err < 0) | 194 | if (err < 0) |
193 | __rtnl_link_unregister(&dummy_link_ops); | 195 | __rtnl_link_unregister(&dummy_link_ops); |
194 | rtnl_unlock(); | 196 | rtnl_unlock(); |