diff options
-rw-r--r-- | arch/x86/kernel/apic/vector.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index bb6f7a2148d7..72b575a0b662 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
@@ -235,6 +235,15 @@ static int allocate_vector(struct irq_data *irqd, const struct cpumask *dest) | |||
235 | if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest)) | 235 | if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest)) |
236 | return 0; | 236 | return 0; |
237 | 237 | ||
238 | /* | ||
239 | * Careful here. @apicd might either have move_in_progress set or | ||
240 | * be enqueued for cleanup. Assigning a new vector would either | ||
241 | * leave a stale vector on some CPU around or in case of a pending | ||
242 | * cleanup corrupt the hlist. | ||
243 | */ | ||
244 | if (apicd->move_in_progress || !hlist_unhashed(&apicd->clist)) | ||
245 | return -EBUSY; | ||
246 | |||
238 | vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu); | 247 | vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu); |
239 | if (vector > 0) | 248 | if (vector > 0) |
240 | apic_update_vector(irqd, vector, cpu); | 249 | apic_update_vector(irqd, vector, cpu); |