Skip to content

Commit b506943

Browse files
committed
Merge branch 'stable/for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
Pull swiotlb fix from Konrad Rzeszutek Wilk: "One single fix in here: under Xen the DMA32 heap (in the hypervisor) would end up looking like swiss cheese. The reason being that for every coherent DMA allocation we didn't do the proper hypercall to tell Xen to return the page back to the DMA32 heap. End result was (eventually) no DMA32 space if you (for example) continously unloaded and loaded modules" * 'stable/for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent
2 parents 34b48b8 + 4855c92 commit b506943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/swiotlb-xen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
351351
* physical address */
352352
phys = xen_bus_to_phys(dev_addr);
353353

354-
if (((dev_addr + size - 1 > dma_mask)) ||
354+
if (((dev_addr + size - 1 <= dma_mask)) ||
355355
range_straddles_page_boundary(phys, size))
356356
xen_destroy_contiguous_region(phys, order);
357357

0 commit comments

Comments
 (0)