|
@@ -235,6 +235,15 @@ static int allocate_vector(struct irq_data *irqd, const struct cpumask *dest)
|
|
if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest))
|
|
if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest))
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Careful here. @apicd might either have move_in_progress set or
|
|
|
|
+ * be enqueued for cleanup. Assigning a new vector would either
|
|
|
|
+ * leave a stale vector on some CPU around or in case of a pending
|
|
|
|
+ * cleanup corrupt the hlist.
|
|
|
|
+ */
|
|
|
|
+ if (apicd->move_in_progress || !hlist_unhashed(&apicd->clist))
|
|
|
|
+ return -EBUSY;
|
|
|
|
+
|
|
vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu);
|
|
vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu);
|
|
if (vector > 0)
|
|
if (vector > 0)
|
|
apic_update_vector(irqd, vector, cpu);
|
|
apic_update_vector(irqd, vector, cpu);
|