linux-stable/drivers/xen
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 xen/events: increment refcnt only if event channel is refcounted 2024-03-26 18:20:09 -04:00
xen-pciback xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-11-20 11:59:12 +01:00
xenbus xenbus: fix error exit in xenbus_init() 2023-11-20 11:59:12 +01:00
xenfs
Kconfig
Makefile
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c xen/evtchn: avoid WARN() when unbinding an event channel 2024-03-26 18:20:09 -04:00
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-02-05 20:14:31 +00:00
gntdev-dmabuf.h
gntdev.c
grant-dma-iommu.c
grant-dma-ops.c
grant-table.c
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c acpi/processor: sanitize _OSC/_PDC capabilities for Xen dom0 2023-11-28 17:19:57 +00:00
platform-pci.c
privcmd-buf.c
privcmd.c xen: Make struct privcmd_irqfd's layout architecture independent 2023-11-20 11:59:12 +01:00
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:33:07 +01:00
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xlate_mmu.c