Linux v4.10.2
This commit is contained in:
parent
6edaa7c42f
commit
6588c82223
|
@ -1,66 +0,0 @@
|
|||
From patchwork Wed Jan 25 18:31:31 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v2] arm64: dma-mapping: Fix dma_mapping_error() when bypassing
|
||||
SWIOTLB
|
||||
From: Robin Murphy <robin.murphy@arm.com>
|
||||
X-Patchwork-Id: 9537723
|
||||
Message-Id: <840027acb4750542003dff17b4a8902ba8972754.1485368348.git.robin.murphy@arm.com>
|
||||
To: will.deacon@arm.com,
|
||||
catalin.marinas@arm.com
|
||||
Cc: Jisheng Zhang <jszhang@marvell.com>, arnd@arndb.de,
|
||||
konrad.wilk@oracle.com, aaro.koskinen@iki.fi, stable@vger.kernel.org,
|
||||
linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 25 Jan 2017 18:31:31 +0000
|
||||
|
||||
When bypassing SWIOTLB on small-memory systems, we need to avoid calling
|
||||
into swiotlb_dma_mapping_error() in exactly the same way as we avoid
|
||||
swiotlb_dma_supported(), because the former also relies on SWIOTLB state
|
||||
being initialised.
|
||||
|
||||
Under the assumptions for which we skip SWIOTLB, dma_map_{single,page}()
|
||||
will only ever return the DMA-offset-adjusted physical address of the
|
||||
page passed in, thus we can report success unconditionally.
|
||||
|
||||
Fixes: b67a8b29df7e ("arm64: mm: only initialize swiotlb when necessary")
|
||||
CC: stable@vger.kernel.org
|
||||
CC: Jisheng Zhang <jszhang@marvell.com>
|
||||
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
|
||||
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
|
||||
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
|
||||
---
|
||||
|
||||
v2: Get the return value the right way round this time... After some
|
||||
careful reasoning it really is that simple.
|
||||
|
||||
arch/arm64/mm/dma-mapping.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
|
||||
index e04082700bb1..1ffb7d5d299a 100644
|
||||
--- a/arch/arm64/mm/dma-mapping.c
|
||||
+++ b/arch/arm64/mm/dma-mapping.c
|
||||
@@ -352,6 +352,13 @@ static int __swiotlb_dma_supported(struct device *hwdev, u64 mask)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int __swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t addr)
|
||||
+{
|
||||
+ if (swiotlb)
|
||||
+ return swiotlb_dma_mapping_error(hwdev, addr);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct dma_map_ops swiotlb_dma_ops = {
|
||||
.alloc = __dma_alloc,
|
||||
.free = __dma_free,
|
||||
@@ -366,7 +373,7 @@ static struct dma_map_ops swiotlb_dma_ops = {
|
||||
.sync_sg_for_cpu = __swiotlb_sync_sg_for_cpu,
|
||||
.sync_sg_for_device = __swiotlb_sync_sg_for_device,
|
||||
.dma_supported = __swiotlb_dma_supported,
|
||||
- .mapping_error = swiotlb_dma_mapping_error,
|
||||
+ .mapping_error = __swiotlb_dma_mapping_error,
|
||||
};
|
||||
|
||||
static int __init atomic_pool_init(void)
|
|
@ -1 +1 @@
|
|||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
|
|
|
@ -1 +1 @@
|
|||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
|
|
|
@ -4332,7 +4332,7 @@ CONFIG_RTC_DRV_S35390A=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
CONFIG_RTC_DRV_V3020=m
|
||||
|
|
|
@ -4310,7 +4310,7 @@ CONFIG_RTC_DRV_S35390A=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
CONFIG_RTC_DRV_V3020=m
|
||||
|
|
|
@ -4710,7 +4710,7 @@ CONFIG_RTC_DRV_S5M=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
CONFIG_RTC_DRV_SNVS=m
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
|
|
@ -4448,7 +4448,7 @@ CONFIG_RTC_DRV_S5M=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
|
|
@ -4427,7 +4427,7 @@ CONFIG_RTC_DRV_S5M=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
|
|
@ -4689,7 +4689,7 @@ CONFIG_RTC_DRV_S5M=m
|
|||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
CONFIG_RTC_DRV_SNVS=m
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_RTC_DRV_SUN6I=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
|
|
10
kernel.spec
10
kernel.spec
|
@ -42,7 +42,7 @@ Summary: The Linux kernel
|
|||
# For non-released -rc kernels, this will be appended after the rcX and
|
||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||
#
|
||||
%global baserelease 1
|
||||
%global baserelease 200
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
|
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||
%if 0%{?released_kernel}
|
||||
|
||||
# Do we have a -stable update to apply?
|
||||
%define stable_update 1
|
||||
%define stable_update 2
|
||||
# Set rpm version accordingly
|
||||
%if 0%{?stable_update}
|
||||
%define stablerev %{stable_update}
|
||||
|
@ -517,9 +517,6 @@ Patch425: ARM-tegra-usb-no-reset.patch
|
|||
|
||||
Patch426: AllWinner-net-emac.patch
|
||||
|
||||
# http://www.spinics.net/lists/arm-kernel/msg557831.html
|
||||
Patch427: arm64-dma-mapping-Fix-dma_mapping_error-when-bypassing-SWIOTLB.patch
|
||||
|
||||
# http://www.spinics.net/lists/devicetree/msg163238.html
|
||||
Patch430: bcm2837-initial-support.patch
|
||||
|
||||
|
@ -2187,6 +2184,9 @@ fi
|
|||
#
|
||||
#
|
||||
%changelog
|
||||
* Mon Mar 13 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.10.2-200
|
||||
- Linux v4.10.2
|
||||
|
||||
* Tue Mar 07 2017 Laura Abbott <labbott@fedoraproject.org>
|
||||
- CVE-2017-2636 Race condition access to n_hdlc.tbuf causes double free in n_hdlc_release (rhbz 1430049)
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1,3 +1,3 @@
|
|||
SHA512 (linux-4.10.tar.xz) = c3690125a8402df638095bd98a613fcf1a257b81de7611c84711d315cd11e2634ab4636302b3742aedf1e3ba9ce0fea53fe8c7d48e37865d8ee5db3565220d90
|
||||
SHA512 (perf-man-4.10.tar.gz) = 2c830e06f47211d70a8330961487af73a8bc01073019475e6b6131d3bb8c95658b77ca0ae5f1b44371accf103658bc5a3a4366b3e017a4088a8fd408dd6867e8
|
||||
SHA512 (patch-4.10.1.xz) = 7d36d210eade03df91dd3bbaa9cb9bdad0a2c60e21a7b6c1be36f7610d4329b6b517517ba8d971458a2e1bc219e639dacccc8ffe6b12b8954c3ba19bf527f239
|
||||
SHA512 (patch-4.10.2.xz) = 9a980fa3a028bef8926c2e2b7fcb1ff918c6d883e00ada95f1b0b35f59e2811e6badd2f9b2f2cc806397c072305ef0b3b2f8f18196c4b9a6ff7a9578bbe04457
|
||||
|
|
Loading…
Reference in New Issue