linux-stable/drivers/xen
Juergen Gross 95af4cb3d0 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:17:34 -04:00
..
events xen/events: increment refcnt only if event channel is refcounted 2024-03-26 18:17:34 -04:00
xen-pciback xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-10-16 15:20:31 +02:00
xenbus xen/xenbus: document will_handle argument for xenbus_watch_path() 2024-02-12 18:03:14 +01:00
xenfs xen: remove unnecessary (void*) conversions 2023-03-16 12:04:00 +01:00
Kconfig xen: privcmd: Add support for ioeventfd 2023-10-16 15:18:33 +02:00
Makefile
acpi.c
arm-device.c
balloon.c xen: Remove now superfluous sentinel element from ctl_table array 2023-10-11 12:16:13 -07:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c efi: Apply allowlist to EFI configuration tables when running under Xen 2023-01-23 11:33:24 +01:00
evtchn.c xen/evtchn: avoid WARN() when unbinding an event channel 2024-03-26 18:17:34 -04:00
features.c
gntalloc.c xen/gntalloc: Replace UAPI 1-element array 2024-02-13 09:06:48 +01:00
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-01-10 07:32:40 +01:00
gntdev-dmabuf.h
gntdev.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
grant-dma-iommu.c xen/grant-dma-iommu: Implement a dummy probe_device() callback 2023-02-13 07:22:08 +01:00
grant-dma-ops.c xen/virtio: Fix NULL deref when a bridge of PCI root bus has no parent 2023-07-04 08:18:21 +02:00
grant-table.c locking/atomic, xen: Use sync_try_cmpxchg() instead of sync_cmpxchg() 2023-10-09 18:14:34 +02:00
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c xen: pcpu: make xen_pcpu_subsys const 2024-02-13 09:03:31 +01:00
platform-pci.c xen: simplify evtchn_do_upcall() call maze 2023-09-19 07:04:49 +02:00
privcmd-buf.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
privcmd.c xen/privcmd: Use memdup_array_user() in alloc_ioreq() 2024-02-13 08:58:21 +01:00
privcmd.h
pvcalls-back.c workqueue: Ordered workqueue creation cleanups 2023-06-27 16:46:06 -07:00
pvcalls-front.c xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock 2023-04-24 07:27:10 +02:00
pvcalls-front.h
swiotlb-xen.c swiotlb-xen: provide the "max_mapping_size" method 2023-11-17 10:45:46 +01:00
sys-hypervisor.c xen: sysfs: make kobj_type structure constant 2023-02-18 16:50:21 +01:00
time.c
unpopulated-alloc.c
xen-acpi-pad.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
xen-acpi-processor.c xen: Switch to use kmemdup() helper 2023-08-21 09:54:05 +02:00
xen-balloon.c xen: balloon: make balloon_subsys const 2024-02-13 09:03:34 +01:00
xen-front-pgdir-shbuf.c xen/shbuf: eliminate 17 kernel-doc warnings 2023-11-13 08:14:42 +01:00
xen-scsiback.c scsi: target: Have drivers report if they support direct submissions 2023-10-13 15:53:57 -04:00
xlate_mmu.c