summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-07-10 12:04:02 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-28 16:29:58 -0700
commit6683151aeea6c7aade12dde7ec2008fc380f0728 (patch)
treeb2a0af340bec8c897dcbfc45098f09eff26613a7 /drivers
parentc51a7a308e2ff38ae5ad3005a7ce8c333779f8fd (diff)
downloadlinux-3.10-6683151aeea6c7aade12dde7ec2008fc380f0728.tar.gz
linux-3.10-6683151aeea6c7aade12dde7ec2008fc380f0728.tar.bz2
linux-3.10-6683151aeea6c7aade12dde7ec2008fc380f0728.zip
ifb: fix rcu_sched self-detected stalls
[ Upstream commit 440d57bc5ff55ec1efb3efc9cbe9420b4bbdfefa ] According to the commit 16b0dc29c1af9df341428f4c49ada4f626258082 (dummy: fix rcu_sched self-detected stalls) Eric Dumazet fix the problem in dummy, but the ifb will occur the same problem like the dummy modules. Trying to "modprobe ifb numifbs=30000" triggers : INFO: rcu_sched self-detected stall on CPU After this splat, RTNL is locked and reboot is needed. We must call cond_resched() to avoid this, even holding RTNL. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ifb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index dc9f6a45515..a11f7a45cb5 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -292,8 +292,10 @@ static int __init ifb_init_module(void)
rtnl_lock();
err = __rtnl_link_register(&ifb_link_ops);
- for (i = 0; i < numifbs && !err; i++)
+ for (i = 0; i < numifbs && !err; i++) {
err = ifb_init_one(i);
+ cond_resched();
+ }
if (err)
__rtnl_link_unregister(&ifb_link_ops);
rtnl_unlock();