exynos-linux-stable/arch/arm
Russell King 5460e4672b ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory
[ Upstream commit 916a008b4b8ecc02fbd035cfb133773dba1ff3d7 ]

dma_get_sgtable() tries to create a scatterlist table containing valid
struct page pointers for the coherent memory allocation passed in to it.

However, memory can be declared via dma_declare_coherent_memory(), or
via other reservation schemes which means that coherent memory is not
guaranteed to be backed by struct pages.  In such cases, the resulting
scatterlist table contains pointers to invalid pages, which causes
kernel oops later.

This patch adds detection of such memory, and refuses to create a
scatterlist table for such memory.

Reported-by: Shuah Khan <shuahkhan@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:23:43 +01:00
..
boot ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend 2017-12-25 14:23:42 +01:00
common Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-10-06 07:59:37 -07:00
configs ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 2017-11-15 15:53:13 +01:00
crypto arm: crypto: reduce priority of bit-sliced AES cipher 2017-11-21 09:23:21 +01:00
firmware
include arm: KVM: Survive unknown traps from guests 2017-12-14 09:28:19 +01:00
kernel ARM: avoid faulting on qemu 2017-12-14 09:28:16 +01:00
kvm arm: KVM: Survive unknown traps from guests 2017-12-14 09:28:19 +01:00
lib ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user() 2017-02-23 17:44:36 +01:00
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: remove duplicate 'const' annotations' 2017-10-08 10:26:11 +02:00
mach-axxia ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM 2016-09-21 22:45:13 +02:00
mach-bcm ARM: remove duplicate 'const' annotations' 2017-10-08 10:26:11 +02:00
mach-berlin
mach-clps711x
mach-cns3xxx ARM: remove duplicate 'const' annotations' 2017-10-08 10:26:11 +02:00
mach-davinci ARM: davinci: PM: support da8xx DT platforms 2017-04-12 12:41:19 +02:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: SoC platform updates for v4.9 2016-10-07 21:18:42 -07:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-11-26 15:26:20 -08:00
mach-integrator ARM: SoC: late DT updates for v4.9 2016-10-07 21:34:49 -07:00
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-keystone ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM 2016-09-21 22:45:13 +02:00
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0 ARM: mv78xx0: simplify ethernet device creation 2016-09-14 16:35:37 +02:00
mach-mvebu mvebu fixes for 4.8 (part 3) 2016-10-17 13:44:03 -07:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: OMAP1: DMA: Correct the number of logical channels 2017-12-09 22:01:50 +01:00
mach-omap2 ARM: OMAP2+: Release device node after it is no longer needed. 2017-12-14 09:28:18 +01:00
mach-orion5x ARM: orion5x: remove extraneous NO_IRQ 2016-09-14 16:36:20 +02:00
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa ARM: pxa: fix pxa25x interrupt init 2017-01-15 13:42:56 +01:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: SoC platform updates for v4.9 2016-10-07 21:18:42 -07:00
mach-s3c64xx
mach-s5pv210
mach-sa1100 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-10-07 09:12:19 -07:00
mach-shmobile ARM: SoC platform updates for v4.9 2016-10-07 21:18:42 -07:00
mach-socfpga
mach-spear ARM: remove duplicate 'const' annotations' 2017-10-08 10:26:11 +02:00
mach-sti
mach-stm32
mach-sunxi
mach-tango
mach-tegra
mach-u300
mach-uniphier ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER 2016-10-22 18:25:35 +09:00
mach-ux500 ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation 2017-01-26 08:24:43 +01:00
mach-versatile ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly 2016-09-21 22:45:05 +02:00
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx
mach-zynq ARM: zynq: Reserve correct amount of non-DMA RAM 2017-01-15 13:42:56 +01:00
mm ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory 2017-12-25 14:23:43 +01:00
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion ARM: orion: simplify orion_ge00_switch_init 2016-09-14 16:36:13 +02:00
plat-pxa
plat-samsung
plat-versatile
probes arm: kprobes: Align stack to 8-bytes in test code 2017-12-25 14:23:37 +01:00
tools
vdso
vfp
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:44:05 +02:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2016-10-07 21:38:00 -07:00
Kconfig-nommu ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM 2017-10-08 10:26:04 +02:00
Kconfig.debug Renesas ARM Based SoC Updates for v4.9 2016-09-15 00:27:27 +02:00
Makefile Merge branches 'misc' and 'sa1111-base' into for-linus 2016-10-06 08:56:43 +01:00