Skip to contentSkip to conversation

ifb: fix rcu_sched self-detected stalls

PATCH In review Ding Tianhong 2 participants 2 messages Jul 10, 2013 – Jul 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ifb: fix rcu_sched self-detected stalls

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.

---
 drivers/net/ifb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ifb.c +3 -1
index dc9f6a4..a11f7a4 100644
@@ -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();
Signature · 1 line
1.8.0
maintainer
#1 lore raw

From: Ding Tianhong <[email protected]>
Date: Wed, 10 Jul 2013 12:04:02 +0800

Quoted 8 lines

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 :

Quoted 7 lines
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.

Applied and queued up for -stable, thanks.