]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation
authorMarc Zyngier <maz@kernel.org>
Sat, 17 Jun 2023 07:32:42 +0000 (08:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:24:14 +0000 (10:24 +0200)
commitd392d2d72af36925513c48e1b8cae1d332227c0a
tree1aba78a9c3c4cc6445c9e6c9f4dd7cd191d2518f
parenta80d2cb27d39f039f3e9cfd952ec675792ab01c8
irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation

[ Upstream commit 926846a703cbf5d0635cc06e67d34b228746554b ]

We normally rely on the irq_to_cpuid_[un]lock() primitives to make
sure nothing will change col->idx while performing a LPI invalidation.

However, these primitives do not cover VPE doorbells, and we have
some open-coded locking for that. Unfortunately, this locking is
pretty bogus.

Instead, extend the above primitives to cover VPE doorbells and
convert the whole thing to it.

Fixes: f3a059219bc7 ("irqchip/gic-v4.1: Ensure mutual exclusion between vPE affinity change and RD access")
Reported-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Zenghui Yu <yuzenghui@huawei.com>
Cc: wanghaibin.wang@huawei.com
Tested-by: Kunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20230617073242.3199746-1-maz@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-gic-v3-its.c