From: Paul E. McKenney Date: Thu, 23 May 2019 20:56:12 +0000 (-0700) Subject: rcu/nocb: Make __call_rcu_nocb_wake() safe for many callbacks X-Git-Tag: v5.4-rc1~181^2~1^2^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce0a825e40606d6dbe6dfe90d4d4c0ccc9fa3bde;p=thirdparty%2Fkernel%2Flinux.git rcu/nocb: Make __call_rcu_nocb_wake() safe for many callbacks It might be hard to imagine having more than two billion callbacks queued on a single CPU's ->cblist, but someone will do it sometime. This commit therefore makes __call_rcu_nocb_wake() handle this situation by upgrading local variable "len" from "int" to "long". Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index b9e00660af609..5cbc0848647c7 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1615,7 +1615,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone, unsigned long flags) __releases(rdp->nocb_lock) { - int len; + long len; struct task_struct *t; // If we are being polled or there is no kthread, just leave.