diff options
| -rw-r--r-- | arch/x86/kernel/apic/vector.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 6066d945c40e..5d30c5e42bb1 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
| @@ -661,11 +661,28 @@ void irq_complete_move(struct irq_cfg *cfg) | |||
| 661 | */ | 661 | */ |
| 662 | void irq_force_complete_move(struct irq_desc *desc) | 662 | void irq_force_complete_move(struct irq_desc *desc) |
| 663 | { | 663 | { |
| 664 | struct irq_data *irqdata = irq_desc_get_irq_data(desc); | 664 | struct irq_data *irqdata; |
| 665 | struct apic_chip_data *data = apic_chip_data(irqdata); | 665 | struct apic_chip_data *data; |
| 666 | struct irq_cfg *cfg = data ? &data->cfg : NULL; | 666 | struct irq_cfg *cfg; |
| 667 | unsigned int cpu; | 667 | unsigned int cpu; |
| 668 | 668 | ||
| 669 | /* | ||
| 670 | * The function is called for all descriptors regardless of which | ||
| 671 | * irqdomain they belong to. For example if an IRQ is provided by | ||
| 672 | * an irq_chip as part of a GPIO driver, the chip data for that | ||
| 673 | * descriptor is specific to the irq_chip in question. | ||
| 674 | * | ||
| 675 | * Check first that the chip_data is what we expect | ||
| 676 | * (apic_chip_data) before touching it any further. | ||
| 677 | */ | ||
| 678 | irqdata = irq_domain_get_irq_data(x86_vector_domain, | ||
| 679 | irq_desc_get_irq(desc)); | ||
| 680 | if (!irqdata) | ||
| 681 | return; | ||
| 682 | |||
| 683 | data = apic_chip_data(irqdata); | ||
| 684 | cfg = data ? &data->cfg : NULL; | ||
| 685 | |||
| 669 | if (!cfg) | 686 | if (!cfg) |
| 670 | return; | 687 | return; |
| 671 | 688 | ||
