Skip to content

Commit a4b58f9

Browse files
edumazetbwhacks
authored andcommitted
dummy: fix rcu_sched self-detected stalls
[ Upstream commit 16b0dc2 ] 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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 parent 14be925 commit a4b58f9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎drivers/net/dummy.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/rtnetlink.h>
3838
#include <net/rtnetlink.h>
3939
#include <linux/u64_stats_sync.h>
40+
#include <linux/sched.h>
4041

4142
static int numdummies = 1;
4243

@@ -186,8 +187,10 @@ static int __init dummy_init_module(void)
186187
rtnl_lock();
187188
err = __rtnl_link_register(&dummy_link_ops);
188189

189-
for (i = 0; i < numdummies && !err; i++)
190+
for (i = 0; i < numdummies && !err; i++) {
190191
err = dummy_init_one();
192+
cond_resched();
193+
}
191194
if (err < 0)
192195
__rtnl_link_unregister(&dummy_link_ops);
193196
rtnl_unlock();

0 commit comments

Comments
 (0)