]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3-its: Fix get_vlpi_map() breakage with doorbells
authorMarc Zyngier <maz@kernel.org>
Wed, 22 Jan 2020 13:53:44 +0000 (13:53 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 22 Jan 2020 14:21:07 +0000 (14:21 +0000)
commitafd8f8ef3d4d866c2b2a930fab9ce4e9a53f6e11
treea1f4a45affbd7df72750afa530b3e8e5703dc959
parentb79914501aca901745342892c34ec0ee32fe42ed
irqchip/gic-v3-its: Fix get_vlpi_map() breakage with doorbells

When updating an LPI configuration, get_vlpi_map() may be passed a
irq_data structure relative to an ITS domain (the normal case) or one
that is relative to the core GICv3 domain in the case of a GICv4
doorbell.

In the latter case, special care must be take not to dereference
the irq_chip data as an its_dev structure, as that isn't what is
stored there. Instead, check *first* whether the IRQ is forwarded
to a vcpu, and only then try to obtain the vlpi mapping.

Fixes: 3638a0e84996 ("irqchip/gic-v3-its: Add its_vlpi_map helpers")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20200122085609.658-1-yuzenghui@huawei.com
drivers/irqchip/irq-gic-v3-its.c