rcu/nocb: Make __call_rcu_nocb_wake() safe for many callbacks
authorPaul E. McKenney <paulmck@linux.ibm.com>
Thu, 23 May 2019 20:56:12 +0000 (13:56 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 13 Aug 2019 21:35:49 +0000 (14:35 -0700)
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 <paulmck@linux.ibm.com>
kernel/rcu/tree_plugin.h

index b9e00660af609f11530c3ad51a447bff70c1ba7a..5cbc0848647c76e6b8fdfb0af87aeb972387288f 100644 (file)
@@ -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.