diff options
| author | Eric Dumazet <edumazet@google.com> | 2012-06-10 17:11:57 -0400 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2012-07-23 05:50:19 -0400 |
| commit | de6bbaffcb5c8998fbf0f69ed0c309596f6415be (patch) | |
| tree | c4b583486a0166be2b128cb24ca92f283070e6a3 /drivers | |
| parent | ddcfb371c601ff7e4760a61a42c9908f0806103b (diff) | |
dummy: fix rcu_sched self-detected stalls
BugLink: http://bugs.launchpad.net/bugs/1025406
[ 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Diffstat (limited to 'drivers')
| -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 3fa19c16211..098ff315694 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include <linux/rtnetlink.h> | 37 | #include <linux/rtnetlink.h> |
| 38 | #include <net/rtnetlink.h> | 38 | #include <net/rtnetlink.h> |
| 39 | #include <linux/u64_stats_sync.h> | 39 | #include <linux/u64_stats_sync.h> |
| 40 | #include <linux/sched.h> | ||
| 40 | 41 | ||
| 41 | static int numdummies = 1; | 42 | static int numdummies = 1; |
| 42 | 43 | ||
| @@ -186,8 +187,10 @@ static int __init dummy_init_module(void) | |||
| 186 | rtnl_lock(); | 187 | rtnl_lock(); |
| 187 | err = __rtnl_link_register(&dummy_link_ops); | 188 | err = __rtnl_link_register(&dummy_link_ops); |
| 188 | 189 | ||
| 189 | for (i = 0; i < numdummies && !err; i++) | 190 | for (i = 0; i < numdummies && !err; i++) { |
| 190 | err = dummy_init_one(); | 191 | err = dummy_init_one(); |
| 192 | cond_resched(); | ||
| 193 | } | ||
| 191 | if (err < 0) | 194 | if (err < 0) |
| 192 | __rtnl_link_unregister(&dummy_link_ops); | 195 | __rtnl_link_unregister(&dummy_link_ops); |
| 193 | rtnl_unlock(); | 196 | rtnl_unlock(); |
