linux-stable/drivers/xen
Roger Pau Monne 5b71573794 xen/pirq: fix error path cleanup when binding MSIs
[ Upstream commit 910f8befdf ]

Current cleanup in the error path of xen_bind_pirq_msi_to_irq is
wrong. First of all there's an off-by-one in the cleanup loop, which
can lead to unbinding wrong IRQs.

Secondly IRQs not bound won't be freed, thus leaking IRQ numbers.

Note that there's no need to differentiate between bound and unbound
IRQs when freeing them, __unbind_from_irq will deal with both of them
correctly.

Fixes: 4892c9b4ad ("xen: add support for MSI message groups")
Reported-by: Hooman Mirhadi <mirhadih@amazon.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Amit Shah <aams@amazon.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:08 +02:00
..
events xen/pirq: fix error path cleanup when binding MSIs 2018-05-30 07:52:08 +02:00
xen-pciback License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xenbus xen: xenbus_dev_frontend: Fix XS_TRANSACTION_END handling 2018-04-19 08:56:21 +02:00
xenfs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi.c
arm-device.c
balloon.c xen/balloon: Mark unallocated host memory as UNUSABLE 2018-03-03 10:24:28 +01:00
biomerge.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpu_hotplug.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dbgp.c
efi.c xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
evtchn.c xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU 2017-06-13 15:30:27 +02:00
fallback.c
features.c
gntalloc.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
gntdev.c xen/gntdev: Fix partial gntdev_mmap() cleanup 2018-03-03 10:24:37 +01:00
grant-table.c xen/grant-table: Use put_page instead of free_page 2018-04-26 11:02:17 +02:00
Kconfig xen: XEN_ACPI_PROCESSOR is Dom0-only 2018-02-25 11:08:03 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
manage.c xen: features and fixes for 4.13-rc1 2017-07-06 19:11:24 -07:00
mcelog.c x86/MCE, xen/mcelog: Make /dev/mcelog registration messages more precise 2017-06-20 23:25:19 +02:00
pci.c
pcpu.c
platform-pci.c xen-platform: constify pci_device_id. 2017-08-31 09:45:55 -04:00
preempt.c
privcmd.c xen/privcmd: Support correctly 64KB page granularity when mapping memory 2017-06-07 11:23:14 +02:00
privcmd.h
pvcalls-back.c xen/pvcalls: fix null pointer dereference on map->sock 2018-05-30 07:52:05 +02:00
swiotlb-xen.c xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent 2018-05-30 07:51:48 +02:00
sys-hypervisor.c xen: add sysfs node for hypervisor build id 2017-06-15 08:50:37 +02:00
time.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-28 10:19:41 +01:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c xen/acpi: upload PM state from init-domain to Xen 2017-03-23 12:00:02 -04:00
xen-balloon.c xen: fix booting ballooned down hvm guest 2017-10-26 08:11:44 -04:00
xen-scsiback.c xen/scsiback: Make TMF processing slightly faster 2017-07-06 22:58:03 -07:00
xen-selfballoon.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-stub.c
xlate_mmu.c