linux/arch/arm
Alexandre Courbot 23be7fdafa ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()
There doesn't seem to be any valid reason to allocate the pages array
with the same flags as the buffer itself. Doing so can eventually lead
to the following safeguard in mm/slab.c's cache_grow() to be hit:

        if (unlikely(flags & GFP_SLAB_BUG_MASK)) {
                pr_emerg("gfp: %un", flags & GFP_SLAB_BUG_MASK);
                BUG();
        }

This happens when buffers are allocated with __GFP_DMA32 or
__GFP_HIGHMEM.

Fix this by allocating the pages array with GFP_KERNEL to follow what is
done elsewhere in this file. Using GFP_KERNEL in __iommu_alloc_buffer()
is safe because atomic allocations are handled by __iommu_alloc_atomic().

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-02-20 11:14:42 +00:00
..
boot ARM: 8294/1: ATAG_DTB_COMPAT: remove the DT workspace's hardcoded 64KB size 2015-01-29 15:23:01 +00:00
common Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
configs PM: Eliminate CONFIG_PM_RUNTIME 2014-12-19 22:55:06 +01:00
crypto crypto: arm - replace memset by memzero_explicit 2014-12-02 22:55:51 +08:00
firmware
include ARM: wire up execveat syscall 2015-01-07 20:31:54 +00:00
kernel ARM: 8295/1: fix v7M build for !CONFIG_PRINTK 2015-01-29 15:23:12 +00:00
kvm 3.19 changes for KVM: 2014-12-18 16:05:28 -08:00
lib ARM: 8225/1: Add unwinding support for memory copy functions 2014-11-27 16:00:25 +00:00
mach-asm9260 ARM: add mach-asm9260 2014-11-28 15:06:38 +01:00
mach-at91 ARM: SoC cleanups for 3.19 2014-12-09 14:18:35 -08:00
mach-axxia
mach-bcm Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 08:38:57 -08:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers 2014-11-28 12:34:08 +01:00
mach-exynos More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-keystone ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-13 00:42:49 +01:00
mach-ks8695
mach-lpc32xx
mach-mediatek ARM: SoC DT updates for 3.19 2014-12-09 14:57:37 -08:00
mach-meson
mach-mmp Please consider pulling the clk framework changes toward 3.19. It is 2014-12-20 16:42:36 -08:00
mach-moxart
mach-msm
mach-mv78xx0
mach-mvebu ARM: mvebu: use the cpufreq-dt platform_data for independent clocks 2014-12-04 17:31:32 +01:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-13 00:42:49 +01:00
mach-omap2 Please consider pulling the clk framework changes toward 3.19. It is 2014-12-20 16:42:36 -08:00
mach-orion5x
mach-picoxcell
mach-prima2
mach-pxa Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mach-qcom
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mach-s3c64xx
mach-s5pv210
mach-sa1100 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mach-shmobile Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
mach-socfpga
mach-spear
mach-sti
mach-sunxi
mach-tegra ACPI and power management updates for 3.19-rc1 2014-12-10 21:17:00 -08:00
mach-u300 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mach-ux500
mach-versatile
mach-vexpress ARM: vexpress: Enable regulator framework when MMCI is in use 2014-11-28 21:57:07 +01:00
mach-vt8500
mach-w90x900
mach-zynq ARM: zynq: Remove secondary_startup() declaration from header 2014-12-01 09:32:22 +01:00
mm ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer() 2015-02-20 11:14:42 +00:00
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion ACPI and power management updates for 3.19-rc1 2014-12-10 21:17:00 -08:00
plat-pxa
plat-samsung Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
plat-versatile ARM: vexpress: Remove non-DT code 2014-11-28 16:08:16 +01:00
tools
vfp
xen xen/arm: introduce GNTTABOP_cache_flush 2014-12-04 12:41:54 +00:00
Kconfig Merge branch 'akpm' (second patch-bomb from Andrew) 2014-12-13 13:00:36 -08:00
Kconfig-nommu
Kconfig.debug Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
Makefile