]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop xen-swiotlb-use-actually-allocated-size-on-check-physical-continuous.patch from...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 14:15:39 +0000 (06:15 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 14:15:39 +0000 (06:15 -0800)
queue-3.18/series
queue-3.18/xen-swiotlb-use-actually-allocated-size-on-check-physical-continuous.patch [deleted file]

index 7e80df33eff9fdcee83ca4cc896ce9d2cc830bb4..62d48f99fff185fbe7682f9ba7ef00819d99f826 100644 (file)
@@ -27,7 +27,6 @@ usb-chipidea-prevent-unbalanced-irq-disable.patch
 uio-ensure-class-is-registered-before-devices.patch
 scsi-lpfc-correct-soft-lockup-when-running-mds-diagnostics.patch
 signal-always-deliver-the-kernel-s-sigkill-and-sigstop-to-a-pid-namespace-init.patch
-xen-swiotlb-use-actually-allocated-size-on-check-physical-continuous.patch
 net-ipv4-defensive-cipso-option-parsing.patch
 jbd2-fix-use-after-free-in-jbd2_log_do_checkpoint.patch
 gfs2_meta-mount-can-get-null-dev_name.patch
diff --git a/queue-3.18/xen-swiotlb-use-actually-allocated-size-on-check-physical-continuous.patch b/queue-3.18/xen-swiotlb-use-actually-allocated-size-on-check-physical-continuous.patch
deleted file mode 100644 (file)
index c05d60d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 7250f422da0480d8512b756640f131b9b893ccda Mon Sep 17 00:00:00 2001
-From: Joe Jin <joe.jin@oracle.com>
-Date: Tue, 16 Oct 2018 15:21:16 -0700
-Subject: xen-swiotlb: use actually allocated size on check physical continuous
-
-From: Joe Jin <joe.jin@oracle.com>
-
-commit 7250f422da0480d8512b756640f131b9b893ccda upstream.
-
-xen_swiotlb_{alloc,free}_coherent() allocate/free memory based on the
-order of the pages and not size argument (bytes). This is inconsistent with
-range_straddles_page_boundary and memset which use the 'size' value,
-which may lead to not exchanging memory with Xen (range_straddles_page_boundary()
-returned true). And then the call to xen_swiotlb_free_coherent() would
-actually try to exchange the memory with Xen, leading to the kernel
-hitting an BUG (as the hypercall returned an error).
-
-This patch fixes it by making the 'size' variable be of the same size
-as the amount of memory allocated.
-
-CC: stable@vger.kernel.org
-Signed-off-by: Joe Jin <joe.jin@oracle.com>
-Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-Cc: Christoph Helwig <hch@lst.de>
-Cc: Dongli Zhang <dongli.zhang@oracle.com>
-Cc: John Sobecki <john.sobecki@oracle.com>
-Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/xen/swiotlb-xen.c |    6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/xen/swiotlb-xen.c
-+++ b/drivers/xen/swiotlb-xen.c
-@@ -314,6 +314,9 @@ xen_swiotlb_alloc_coherent(struct device
-       if (dma_alloc_from_coherent(hwdev, size, dma_handle, &ret))
-               return ret;
-+      /* Convert the size to actually allocated. */
-+      size = 1UL << (order + XEN_PAGE_SHIFT);
-+
-       /* On ARM this function returns an ioremap'ped virtual address for
-        * which virt_to_phys doesn't return the corresponding physical
-        * address. In fact on ARM virt_to_phys only works for kernel direct
-@@ -366,6 +369,9 @@ xen_swiotlb_free_coherent(struct device
-        * physical address */
-       phys = xen_bus_to_phys(dev_addr);
-+      /* Convert the size to actually allocated. */
-+      size = 1UL << (order + XEN_PAGE_SHIFT);
-+
-       if (((dev_addr + size - 1 <= dma_mask)) ||
-           range_straddles_page_boundary(phys, size))
-               xen_destroy_contiguous_region(phys, order);