linux-imx/drivers/xen/events
Juergen Gross cfbb3abadc xen/events: increment refcnt only if event channel is refcounted
[ Upstream commit d277f9d828 ]

In bind_evtchn_to_irq_chip() don't increment the refcnt of the event
channel blindly. In case the event channel is NOT refcounted, issue a
warning instead.

Add an additional safety net by doing the refcnt increment only if the
caller has specified IRQF_SHARED in the irqflags parameter.

Fixes: 9e90e58c11 ("xen: evtchn: Allow shared registration of IRQ handers")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Link: https://lore.kernel.org/r/20240313071409.25913-3-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:20:09 -04:00
..
events_2l.c xen/events: reduce externally visible helper functions 2024-03-01 13:34:57 +01:00
events_base.c xen/events: increment refcnt only if event channel is refcounted 2024-03-26 18:20:09 -04:00
events_fifo.c xen/events: don't unmask an event channel when an eoi is pending 2021-03-10 16:37:29 -06:00
events_internal.h xen/events: reduce externally visible helper functions 2024-03-01 13:34:57 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00