linux-kernel-test/arch/arm
Aaro Koskinen d9e0d149b5 ARM: dma-mapping: fix incorrect freeing of atomic allocations
Commit e9da6e9905 (ARM: dma-mapping:
remove custom consistent dma region) changed the way atomic allocations
are handled. However, arm_dma_free() was not modified accordingly, and
as a result freeing of atomic allocations does not work correctly when
CMA is disabled. Memory is leaked and following WARNINGs are seen:

[   57.698911] ------------[ cut here ]------------
[   57.753518] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   57.811473] trying to free invalid coherent area: e0848000
[   57.867398] Modules linked in: sata_mv(-)
[   57.921373] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   58.033924] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   58.152024] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   58.219592] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   58.345526] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   58.475782] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   58.614260] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   58.756527] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   58.901648] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   59.051447] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   59.207996] ---[ end trace 0745420412c0325a ]---
[   59.287110] ------------[ cut here ]------------
[   59.366324] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   59.450511] trying to free invalid coherent area: e0847000
[   59.534357] Modules linked in: sata_mv(-)
[   59.616785] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   59.790030] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   59.972322] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   60.070701] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   60.256817] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   60.445201] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   60.634148] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   60.823623] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   61.013268] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   61.203472] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   61.393390] ---[ end trace 0745420412c0325b ]---

The patch fixes this.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-09 07:46:07 +02:00
..
boot ARM: arm-soc Marvell Orion device-tree updates 2012-08-02 11:50:24 -07:00
common ARM: dma-mapping: add support for dma_get_sgtable() 2012-07-30 12:25:47 +02:00
configs Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
include/asm Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:30:45 -07:00
kernel Merge branch 'audit' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:35:37 -07:00
lib arch: remove direct definitions of KERN_<LEVEL> uses 2012-07-30 17:25:13 -07:00
mach-at91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-07-26 13:00:59 -07:00
mach-bcmring
mach-clps711x ARM: clps711x: Remove the setting of the time 2012-07-17 22:24:30 +02:00
mach-cns3xxx
mach-davinci fbdev updates for 3.6 2012-08-01 10:45:12 -07:00
mach-dove ARM: Orion: DT support for IRQ and GPIO Controllers 2012-07-27 16:48:14 +02:00
mach-ebsa110
mach-ep93xx arm-soc: soc-specific updates 2012-07-23 16:08:40 -07:00
mach-exynos MFD bits for the 3.6 merge window. 2012-07-30 12:41:17 -07:00
mach-footbridge
mach-gemini
mach-h720x
mach-highbank clk: add highbank clock support 2012-07-11 17:58:47 -07:00
mach-imx GPIO changes for v3.6: 2012-07-26 13:56:38 -07:00
mach-integrator ARM: integrator: convert to common clock 2012-07-11 17:58:45 -07:00
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-kirkwood ARM: Kirkwood: Replace mrvl with marvell 2012-07-27 16:50:57 +02:00
mach-ks8695
mach-l7200/include/mach
mach-lpc32xx ARM: LPC32xx: Add PWM clock 2012-07-20 14:01:51 +02:00
mach-mmp ARM: mmp: add missing irqs.h 2012-08-02 10:15:59 -07:00
mach-msm ARM: MSM: use SGI0 to wake secondary CPUs 2012-07-09 17:39:36 +01:00
mach-mv78xx0 ARM: Orion: DT support for IRQ and GPIO Controllers 2012-07-27 16:48:14 +02:00
mach-mvebu arm: mvebu: generate DTBs for supported SoCs 2012-07-17 22:38:06 +02:00
mach-mxs ARM: mxs: fix compile error caused by prom_update_property change 2012-07-25 22:36:39 -07:00
mach-netx arch/arm/mach-netx/fb.c: reuse dummy clk routines for CONFIG_HAVE_CLK=n 2012-07-30 17:25:13 -07:00
mach-nomadik
mach-omap1 Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
mach-omap2 ARM: arm-soc: cpuidle enablement for OMAP 2012-08-02 11:48:54 -07:00
mach-orion5x ARM: Orion: DT support for IRQ and GPIO Controllers 2012-07-27 16:48:14 +02:00
mach-picoxcell clocksource: dw_apb_timer: Add common DTS glue for dw_apb_timer 2012-07-12 17:26:09 +02:00
mach-pnx4008
mach-prima2 ARM: PRIMA2: delete redundant codes to restore LATCHED when timer resumes 2012-08-02 10:05:27 -07:00
mach-pxa This patch series contains a major revamp of how we collect entropy 2012-07-31 19:07:42 -07:00
mach-realview
mach-rpc
mach-s3c24xx arm-soc: device tree description updates 2012-07-23 16:17:43 -07:00
mach-s3c64xx ARM: arm-soc soc updates, take 2 2012-07-30 09:45:53 -07:00
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s5p64x0 arm-soc: device tree description updates 2012-07-23 16:17:43 -07:00
mach-s5pc100 arm-soc: device tree description updates 2012-07-23 16:17:43 -07:00
mach-s5pv210 arm-soc: board specific updates 2012-07-23 17:34:48 -07:00
mach-sa1100 Merge branches 'audit', 'delay', 'fixes', 'misc' and 'sta2x11' into for-linus 2012-07-27 23:06:32 +01:00
mach-shark
mach-shmobile ARM: arm-soc board updates, take 2 2012-07-30 09:48:00 -07:00
mach-socfpga ARM: socfpga: initial support for Altera's SOCFPGA platform 2012-07-19 10:39:00 +02:00
mach-spear3xx Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
mach-spear6xx Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
mach-spear13xx
mach-tegra Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm 2012-07-30 09:22:37 -07:00
mach-u300 ARM: u300: convert to common clock 2012-07-11 15:36:45 -07:00
mach-ux500 MFD bits for the 3.6 merge window. 2012-07-30 12:41:17 -07:00
mach-versatile ARM: fix mach-versatile/pci.c warning 2012-07-04 17:04:57 +01:00
mach-vexpress ARM: vexpress: Config option for early printk console 2012-07-13 11:48:29 +01:00
mach-vt8500 Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm 2012-07-30 09:22:37 -07:00
mach-w90x900
mach-zynq
mm ARM: dma-mapping: fix incorrect freeing of atomic allocations 2012-08-09 07:46:07 +02:00
net
nwfpe
oprofile ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration 2012-07-09 17:41:10 +01:00
plat-iop
plat-mxc ARM: SoC fixes 2012-08-02 11:48:20 -07:00
plat-nomadik i2c-nomadik: move header to <linux/platform_data/i2c-nomadik.h> 2012-07-09 11:40:40 +02:00
plat-omap Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
plat-orion ARM: Orion: Add arch support needed for I2C via DT. 2012-07-27 16:48:29 +02:00
plat-pxa Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm 2012-07-30 09:22:37 -07:00
plat-s3c24xx
plat-samsung Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm 2012-07-30 09:22:37 -07:00
plat-spear Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:41:07 -07:00
plat-versatile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
tools
vfp Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-08-01 16:30:45 -07:00
Kconfig ARM: arm-soc Marvell Orion device-tree updates 2012-08-02 11:50:24 -07:00
Kconfig-nommu
Kconfig.debug Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00
Makefile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-07-27 15:14:26 -07:00