diff options
author | Joe Jin <joe.jin@oracle.com> | 2018-05-17 12:33:28 -0700 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2018-05-18 14:37:16 -0400 |
commit | 4855c92dbb7b3b85c23e88ab7ca04f99b9677b41 (patch) | |
tree | 2127edd7b61a2b021742e49cbc6354d1fa9015c6 /block/blk-core.c | |
parent | 75bc37fefc4471e718ba8e651aa74673d4e0a9eb (diff) | |
download | linux-stable-4855c92dbb7b3b85c23e88ab7ca04f99b9677b41.tar.gz linux-stable-4855c92dbb7b3b85c23e88ab7ca04f99b9677b41.tar.bz2 linux-stable-4855c92dbb7b3b85c23e88ab7ca04f99b9677b41.zip |
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 6810df88dcfc2 "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>
Diffstat (limited to 'block/blk-core.c')
0 files changed, 0 insertions, 0 deletions