diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-10 21:11:57 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-07-12 04:32:14 +0100 |
commit | a4b58f97eb86a82393d6dce799c265db93a99a50 (patch) | |
tree | edd282f2aacb0fee9ed8cbe38829403f80f1a4ca | |
parent | 14be92503e6e67bce5c2c8259036b88f66cafc46 (diff) | |
download | lwn-a4b58f97eb86a82393d6dce799c265db93a99a50.tar.gz lwn-a4b58f97eb86a82393d6dce799c265db93a99a50.zip |
dummy: fix rcu_sched self-detected stalls
[ Upstream commit 16b0dc29c1af9df341428f4c49ada4f626258082 ]
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>
-rw-r--r-- | drivers/net/dummy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index eeac9caab649..68fe73cf6898 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -37,6 +37,7 @@ #include <linux/rtnetlink.h> #include <net/rtnetlink.h> #include <linux/u64_stats_sync.h> +#include <linux/sched.h> static int numdummies = 1; @@ -186,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(); |