Revision 2cff98b99c469880ce830cbcde015b53b67e0a7b authored by Dean Nelson on 29 April 2015, 15:09:18 UTC, committed by Will Deacon on 29 April 2015, 16:39:39 UTC
__dma_alloc() does a PAGE_ALIGN() on the passed in size argument before doing anything else. __dma_free() does not. And because it doesn't, it is possible to leak memory should size not be an integer multiple of PAGE_SIZE. The solution is to add a PAGE_ALIGN() to __dma_free() like is done in __dma_alloc(). Additionally, this patch removes a redundant PAGE_ALIGN() from __dma_alloc_coherent(), since __dma_alloc_coherent() can only be called from __dma_alloc(), which already does a PAGE_ALIGN() before the call. Cc: stable@vger.kernel.org Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 6829e27
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 10.0 KB |
Makefile | -rw-r--r-- | 1.1 KB |
amd_iommu.c | -rw-r--r-- | 97.2 KB |
amd_iommu_init.c | -rw-r--r-- | 57.6 KB |
amd_iommu_proto.h | -rw-r--r-- | 3.3 KB |
amd_iommu_types.h | -rw-r--r-- | 20.3 KB |
amd_iommu_v2.c | -rw-r--r-- | 21.2 KB |
arm-smmu.c | -rw-r--r-- | 50.6 KB |
dmar.c | -rw-r--r-- | 49.0 KB |
exynos-iommu.c | -rw-r--r-- | 31.5 KB |
fsl_pamu.c | -rw-r--r-- | 33.6 KB |
fsl_pamu.h | -rw-r--r-- | 13.3 KB |
fsl_pamu_domain.c | -rw-r--r-- | 27.7 KB |
fsl_pamu_domain.h | -rw-r--r-- | 2.6 KB |
intel-iommu.c | -rw-r--r-- | 118.8 KB |
intel_irq_remapping.c | -rw-r--r-- | 30.5 KB |
io-pgtable-arm.c | -rw-r--r-- | 25.7 KB |
io-pgtable.c | -rw-r--r-- | 2.2 KB |
io-pgtable.h | -rw-r--r-- | 4.3 KB |
iommu-sysfs.c | -rw-r--r-- | 3.0 KB |
iommu-traces.c | -rw-r--r-- | 633 bytes |
iommu.c | -rw-r--r-- | 32.4 KB |
iova.c | -rw-r--r-- | 13.5 KB |
ipmmu-vmsa.c | -rw-r--r-- | 22.1 KB |
irq_remapping.c | -rw-r--r-- | 8.0 KB |
irq_remapping.h | -rw-r--r-- | 2.6 KB |
msm_iommu.c | -rw-r--r-- | 17.1 KB |
msm_iommu.h | -rw-r--r-- | 3.8 KB |
msm_iommu_dev.c | -rw-r--r-- | 8.5 KB |
msm_iommu_hw-8xxx.h | -rw-r--r-- | 74.0 KB |
of_iommu.c | -rw-r--r-- | 4.8 KB |
omap-iommu-debug.c | -rw-r--r-- | 4.7 KB |
omap-iommu.c | -rw-r--r-- | 31.3 KB |
omap-iommu.h | -rw-r--r-- | 5.6 KB |
omap-iopgtable.h | -rw-r--r-- | 2.7 KB |
rockchip-iommu.c | -rw-r--r-- | 27.7 KB |
shmobile-iommu.c | -rw-r--r-- | 10.7 KB |
shmobile-ipmmu.c | -rw-r--r-- | 3.0 KB |
shmobile-ipmmu.h | -rw-r--r-- | 875 bytes |
tegra-gart.c | -rw-r--r-- | 12.0 KB |
tegra-smmu.c | -rw-r--r-- | 17.1 KB |
Computing file changes ...