Commit 16b0dc29 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5d21c4b
...@@ -187,8 +187,10 @@ static int __init dummy_init_module(void) ...@@ -187,8 +187,10 @@ static int __init dummy_init_module(void)
rtnl_lock(); rtnl_lock();
err = __rtnl_link_register(&dummy_link_ops); 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(); err = dummy_init_one();
cond_resched();
}
if (err < 0) if (err < 0)
__rtnl_link_unregister(&dummy_link_ops); __rtnl_link_unregister(&dummy_link_ops);
rtnl_unlock(); rtnl_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment