android_kernel_oneplus_msm8998/drivers/xen
Roger Pau Monne db8d72aeb0 xen/pirq: fix error path cleanup when binding MSIs
[ Upstream commit 910f8befdf5bccf25287d9f1743e3e546bcb7ce0 ]

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:49:02 +02:00
..
events xen/pirq: fix error path cleanup when binding MSIs 2018-05-30 07:49:02 +02:00
xen-pciback xen/pciback: Fix conf_space read/write overlap check. 2016-08-10 11:49:26 +02:00
xenbus xen: xenbus driver must not accept invalid transaction ids 2017-11-30 08:37:28 +00:00
xenfs
acpi.c
balloon.c
biomerge.c xen: fix bio vec merging 2017-08-24 17:02:36 -07:00
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
fallback.c
features.c
gntalloc.c
gntdev.c xen/gntdev: Fix partial gntdev_mmap() cleanup 2018-03-03 10:19:45 +01:00
grant-table.c xen/grant-table: Use put_page instead of free_page 2018-05-30 07:48:56 +02:00
Kconfig xen: XEN_ACPI_PROCESSOR is Dom0-only 2018-02-25 11:03:41 +01:00
Makefile
manage.c xen: don't print error message in case of missing Xenstore entry 2017-11-08 10:06:30 +01:00
mcelog.c
pci.c
pcpu.c
platform-pci.c
preempt.c
privcmd.c xen/privcmd: Support correctly 64KB page granularity when mapping memory 2017-06-14 13:16:22 +02:00
privcmd.h
swiotlb-xen.c xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent 2018-05-30 07:48:51 +02:00
sys-hypervisor.c
tmem.c
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-30 09:35:18 +02:00
xen-balloon.c
xen-scsiback.c
xen-selfballoon.c
xen-stub.c
xlate_mmu.c