Patch "rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs()" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs()

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rcu-tasks-handle-sparse-cpu_possible_mask-in-rcu_tas.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 835986639dfdf1dac4085bd9c675fb5ef26a50ab
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
Date:   Fri Apr 8 09:21:50 2022 -0700

    rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs()
    
    [ Upstream commit ab2756ea6b74987849b44ad0e33c3cfec159033b ]
    
    If the cpu_possible_mask is sparse (for example, if bits are set only for
    CPUs 0, 4, 8, ...), then rcu_tasks_invoke_cbs() will access per-CPU data
    for a CPU not in cpu_possible_mask.  It makes these accesses while doing
    a workqueue-based binary search for non-empty callback lists.  Although
    this search must pass through CPUs not represented in cpu_possible_mask,
    it has no need to check the callback list for such CPUs.
    
    This commit therefore changes the rcu_tasks_invoke_cbs() function's
    binary search so as to only check callback lists for CPUs present in
    cpu_possible_mask.
    
    Reported-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 30c42797f53b..1664e472524b 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -460,7 +460,7 @@ static void rcu_tasks_invoke_cbs(struct rcu_tasks *rtp, struct rcu_tasks_percpu
 		}
 	}
 
-	if (rcu_segcblist_empty(&rtpcp->cblist))
+	if (rcu_segcblist_empty(&rtpcp->cblist) || !cpu_possible(cpu))
 		return;
 	raw_spin_lock_irqsave_rcu_node(rtpcp, flags);
 	rcu_segcblist_advance(&rtpcp->cblist, rcu_seq_current(&rtp->tasks_gp_seq));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux