Skip to content

Commit 7e1777f

Browse files
committed
Merge tag 'irq-urgent-2022-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Thomas Gleixner: "A single fix for the interrupt affinity spreading logic to take into account that there can be an imbalance between present and possible CPUs, which causes already assigned bits to be overwritten" * tag 'irq-urgent-2022-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/affinity: Consider that CPUs on nodes can be unbalanced
2 parents 9a921a6 + 08d835d commit 7e1777f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/irq/affinity.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
269269
*/
270270
if (numvecs <= nodes) {
271271
for_each_node_mask(n, nodemsk) {
272-
cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
273-
node_to_cpumask[n]);
272+
/* Ensure that only CPUs which are in both masks are set */
273+
cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
274+
cpumask_or(&masks[curvec].mask, &masks[curvec].mask, nmsk);
274275
if (++curvec == last_affv)
275276
curvec = firstvec;
276277
}

0 commit comments

Comments
 (0)