linux/kernel/irq
Jinjie Ruan 5f994f5341 genirq/msi: Fix off-by-one error in msi_domain_alloc()
The error path in msi_domain_alloc(), frees the already allocated MSI
interrupts in a loop, but the loop condition terminates when the index
reaches zero, which fails to free the first allocated MSI interrupt at
index zero.

Check for >= 0 so that msi[0] is freed as well.

Fixes: f3cf8bb0d6 ("genirq: Add generic msi irq domain support")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241026063639.10711-1-ruanjinjie@huawei.com
2024-10-27 10:40:47 +01:00
..
affinity.c genirq/affinity: Move group_cpus_evenly() into lib/ 2023-01-17 18:50:06 +01:00
autoprobe.c
chip.c genirq: Use cpumask_intersects() 2024-09-08 16:06:51 +02:00
cpuhotplug.c genirq/cpuhotplug: Use cpumask_intersects() 2024-09-06 16:28:39 +02:00
debug.h
debugfs.c genirq/debugfs: Print irqdomain flags as human-readable strings 2024-06-03 12:24:51 +02:00
devres.c irqdomain: Add a resource managed version of irq_domain_instantiate() 2024-06-17 15:48:14 +02:00
dummychip.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
generic-chip.c genirq/generic_chip: Introduce init() and exit() hooks 2024-06-17 15:48:14 +02:00
handle.c irq: remove unused flags argument from __handle_irq_event_percpu() 2022-01-07 00:25:25 +01:00
internals.h genirq/debugfs: Print irqdomain flags as human-readable strings 2024-06-03 12:24:51 +02:00
ipi-mux.c genirq/ipi-mux: Use irq_domain_alloc_irqs() 2023-02-06 17:21:15 +00:00
ipi.c genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask() 2023-02-20 13:53:41 +01:00
irq_sim.c genirq/irq_sim: Remove unused irq_sim_work_ctx:: Irq_base 2024-08-08 17:15:01 +02:00
irqdesc.c genirq/irqdesc: Honor caller provided affinity in alloc_desc() 2024-08-07 17:27:00 +02:00
irqdomain.c irqdomain: Use IS_ERR_OR_NULL() in irq_domain_trim_hierarchy() 2024-08-29 16:42:07 +02:00
Kconfig genirq: Provide a snapshot mechanism for interrupt statistics 2024-04-12 17:08:05 +02:00
Makefile genirq: Add mechanism to multiplex a single HW IPI 2023-02-05 10:57:55 +00:00
manage.c genirq: Get rid of global lock in irq_do_set_affinity() 2024-08-27 13:54:15 +02:00
matrix.c genirq/matrix: Dynamic bitmap allocation 2024-02-23 10:18:44 +01:00
migration.c genirq: Use cpumask_intersects() 2024-09-08 16:06:51 +02:00
msi.c genirq/msi: Fix off-by-one error in msi_domain_alloc() 2024-10-27 10:40:47 +01:00
pm.c genirq/PM: Unexport {suspend,resume}_device_irqs() 2022-06-13 12:27:37 +02:00
proc.c genirq/proc: Change the return value for set affinity permission error 2024-08-29 16:42:06 +02:00
resend.c genirq: Reuse irq_is_nmi() 2024-04-24 20:42:57 +02:00
settings.h genirq: Add a IRQF_NO_DEBUG flag 2021-05-17 20:01:35 +02:00
spurious.c genirq: Disable irqfixup/poll on PREEMPT_RT. 2021-09-19 23:01:15 +02:00
timings.c Updates to the interrupt core and driver subsystems: 2021-08-30 14:38:37 -07:00