1
0
Fork 0
alistair23-linux/drivers/xen
Joe Jin 4855c92dbb xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent
When run raidconfig from Dom0 we found that the Xen DMA heap is reduced,
but Dom Heap is increased by the same size. Tracing raidconfig we found
that the related ioctl() in megaraid_sas will call dma_alloc_coherent()
to apply memory. If the memory allocated by Dom0 is not in the DMA area,
it will exchange memory with Xen to meet the requiment. Later drivers
call dma_free_coherent() to free the memory, on xen_swiotlb_free_coherent()
the check condition (dev_addr + size - 1 <= dma_mask) is always false,
it prevents calling xen_destroy_contiguous_region() to return the memory
to the Xen DMA heap.

This issue introduced by commit 6810df88dc "xen-swiotlb: When doing
coherent alloc/dealloc check before swizzling the MFNs.".

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Tested-by: John Sobecki <john.sobecki@oracle.com>
Reviewed-by: Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2018-05-18 14:37:16 -04:00
..
events xen/pirq: fix error path cleanup when binding MSIs 2018-02-28 20:20:01 +01:00
xen-pciback xen: xen-pciback: Replace GFP_ATOMIC with GFP_KERNEL in pcistub_reg_add 2018-04-16 10:20:45 -04:00
xenbus xen: xenbus_dev_frontend: Really return response string 2018-04-17 08:29:08 -04:00
xenfs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig xen: XEN_ACPI_PROCESSOR is Dom0-only 2017-12-12 09:39:43 -05:00
Makefile xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
acpi.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
arm-device.c Xen: ARM: Zero reserved fields of xatp before making hypervisor call 2017-01-03 10:06:13 -08:00
balloon.c xen/balloon: Mark unallocated host memory as UNUSABLE 2017-12-20 13:16:20 -05: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 vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
fallback.c
features.c xen: audit usages of module.h ; remove unnecessary instances 2016-03-21 15:13:32 +00:00
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-01-10 08:38:44 -05:00
grant-table.c xen/grant-table: Use put_page instead of free_page 2018-02-06 09:55:37 +01:00
manage.c xen/time: do not decrease steal time after live migration on xen 2017-11-02 16:49:41 -04:00
mcelog.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
pci.c xen/pci: Try harder to get PXM information for Xen 2015-04-15 10:57:28 +01:00
pcpu.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
platform-pci.c xen-platform: constify pci_device_id. 2017-08-31 09:45:55 -04:00
preempt.c xen/preempt: use need_resched() instead of should_resched() 2015-08-20 12:24:14 +01:00
privcmd.c xen/privcmd: remove unused variable pageidx 2017-11-08 09:15:28 -05:00
privcmd.h
pvcalls-back.c xen/pvcalls: fix null pointer dereference on map->sock 2018-02-26 17:13:12 +01:00
pvcalls-front.c pvcalls-front: 64-bit align flags 2018-03-01 07:23:36 +01:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent 2018-05-18 14:37:16 -04:00
sys-hypervisor.c xen: add sysfs node for hypervisor build id 2017-06-15 08:50:37 +02:00
time.c xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-21 15:35:43 -08:00
xen-acpi-cpuhotplug.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-memhotplug.c ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
xen-acpi-pad.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-processor.c xen/acpi: off by one in read_acpi_id() 2018-03-30 11:30:13 -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 Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn 2016-07-06 10:34:42 +01:00