android_kernel_xiaomi_sm8450/kernel/irq
Marc Zyngier aeab1f1a60 irqdomain: Fix domain registration race
[ Upstream commit 8932c32c3053accd50702b36e944ac2016cd103c ]

Hierarchical domains created using irq_domain_create_hierarchy() are
currently added to the domain list before having been fully initialised.

This specifically means that a racing allocation request might fail to
allocate irq data for the inner domains of a hierarchy in case the
parent domain pointer has not yet been set up.

Note that this is not really any issue for irqchip drivers that are
registered early (e.g. via IRQCHIP_DECLARE() or IRQCHIP_ACPI_DECLARE())
but could potentially cause trouble with drivers that are registered
later (e.g. modular drivers using IRQCHIP_PLATFORM_DRIVER_BEGIN(),
gpiochip drivers, etc.).

Fixes: afb7da83b9 ("irqdomain: Introduce helper function irq_domain_add_hierarchy()")
Cc: stable@vger.kernel.org      # 3.19
Signed-off-by: Marc Zyngier <maz@kernel.org>
[ johan: add commit message ]
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230213104302.17307-8-johan+linaro@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:45:08 +01:00
..
affinity.c genirq/affinity: Consider that CPUs on nodes can be unbalanced 2022-04-20 09:23:29 +02:00
autoprobe.c genirq: Delay deactivation in free_irq() 2019-07-03 10:12:28 +02:00
chip.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00
cpuhotplug.c genirq, sched/isolation: Isolate from handling managed interrupts 2020-01-22 16:29:49 +01:00
debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk 2018-02-01 13:36:15 -08:00
debugfs.c Merge branch 'irq/qcom-pdc-wakeup' into irq/irqchip-next 2020-10-06 11:28:03 +01:00
devres.c genirq/devres: Use struct_size() in devm_kzalloc() 2019-04-16 21:54:03 +02:00
dummychip.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00
generic-chip.c genirq: Add missing SPDX identifiers 2018-03-20 14:23:28 +01:00
handle.c random: remove unused irq_flags argument from add_interrupt_randomness() 2022-05-30 09:33:27 +02:00
internals.h genirq/irqdesc: Don't try to remove non-existing sysfs files 2023-01-14 10:15:18 +01:00
ipi.c genirq: Fix various typos in comments 2018-12-18 14:22:28 +01:00
irq_sim.c genirq/irq_sim: Simplify the API 2020-05-18 10:30:21 +01:00
irqdesc.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00
irqdomain.c irqdomain: Fix domain registration race 2023-03-17 08:45:08 +01:00
Kconfig genirq: GENERIC_IRQ_IPI depends on SMP 2022-08-21 15:15:28 +02:00
Makefile genirq/timings: Add selftest for circular array 2019-06-12 10:47:04 +02:00
manage.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00
matrix.c genirq/matrix: Prevent allocation counter corruption 2021-05-11 14:47:17 +02:00
migration.c genirq/migration: Avoid out of line call if pending is not set 2018-06-06 15:18:20 +02:00
msi.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00
pm.c genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag 2020-10-06 11:23:41 +01:00
proc.c genirq: Allow interrupts to be excluded from /proc/interrupts 2020-09-13 17:04:38 +01:00
resend.c genirq: Walk the irq_data hierarchy when resending an interrupt 2020-09-06 18:25:23 +01:00
settings.h genirq: Allow interrupts to be excluded from /proc/interrupts 2020-09-13 17:04:38 +01:00
spurious.c genirq: Add missing __must_hold() sparse annotation 2020-01-09 18:03:37 +01:00
timings.c irq: Fix typos in comments 2023-03-17 08:45:07 +01:00