mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
dummy: fix rcu_sched self-detected stalls
[ Upstream commit 16b0dc29c1 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e99e096f4b
commit
7dd0931198
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user