History

genirq: Dont allow affinity mask to be updated on IPIs

The IPI domain re-purposes the IRQ affinity to signify the mask of CPUs that this IPI will deliver to. This must not be modified before the IPI is destroyed again, so set the IRQ_NO_BALANCING flag to prevent the affinity being overwritten by setup_affinity(). Without this, if an IPI is reserved for a single target CPU, then allocated using __setup_irq(), the affinity is overwritten with cpu_online_mask. When ipi_destroy() is subsequently called on a multi-cpu system, it will attempt to free cpumask_weight() IRQs that were never allocated, and crash.

Matt Redfearn committed 10 years ago

Commit 4589f451 parent c3b46c71 file · +1 −0Browse files

Showing the changes to kernel/irq (1 of 1 file). Show all

Unified · Split

kernel/irq/ipi.c+1−0
@@ -94,6 +94,7 @@ unsigned int irq_reserve_ipi(struct irq_domain *domain, · 93 unmodified lines
94 data = irq_get_irq_data(virq + i);94 data = irq_get_irq_data(virq + i);
95 cpumask_copy(data->common->affinity, dest);95 cpumask_copy(data->common->affinity, dest);
96 data->common->ipi_offset = offset;96 data->common->ipi_offset = offset;
97 irq_set_status_flags(virq + i, IRQ_NO_BALANCING);
97 }98 }
98 return virq;99 return virq;
99 100

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t