diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-10-18 12:31:04 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-10-18 12:31:04 +0800 |
| commit | 2308e34317c8cc7beb03a3d18dc39d32015eff06 (patch) | |
| tree | 69aedaeeaa06f2623a3de1ba8787a8f7cafd59fc /arch/x86/kernel/apic/vector.c | |
| parent | be2a76aecfc5ed58ddf8925190cc1cfb519bf932 (diff) | |
| parent | 6c789d9eddab3bff59e89aa6f2723b1ff652fed9 (diff) | |
Merge tag 'v4.4.25' into linux-linaro-lsk-v4.4
This is the 4.4.25 stable release
Diffstat (limited to 'arch/x86/kernel/apic/vector.c')
| -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 df6b4eeac0bd..0988e204f1e3 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -659,11 +659,28 @@ void irq_complete_move(struct irq_cfg *cfg) */ void irq_force_complete_move(struct irq_desc *desc) { - struct irq_data *irqdata = irq_desc_get_irq_data(desc); - struct apic_chip_data *data = apic_chip_data(irqdata); - struct irq_cfg *cfg = data ? &data->cfg : NULL; + struct irq_data *irqdata; + struct apic_chip_data *data; + struct irq_cfg *cfg; unsigned int cpu; + /* + * The function is called for all descriptors regardless of which + * irqdomain they belong to. For example if an IRQ is provided by + * an irq_chip as part of a GPIO driver, the chip data for that + * descriptor is specific to the irq_chip in question. + * + * Check first that the chip_data is what we expect + * (apic_chip_data) before touching it any further. + */ + irqdata = irq_domain_get_irq_data(x86_vector_domain, + irq_desc_get_irq(desc)); + if (!irqdata) + return; + + data = apic_chip_data(irqdata); + cfg = data ? &data->cfg : NULL; + if (!cfg) return; |
