Skip to content

Commit

Permalink
dummy: fix rcu_sched self-detected stalls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 11, 2012
1 parent c5d21c4 commit 16b0dc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 16b0dc2

Please sign in to comment.