mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From f044936caab337a4384fbfe64a4cbae33c7e22a1 Mon Sep 17 00:00:00 2001
|
|
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
Date: Wed, 23 Oct 2013 16:14:59 +0100
|
|
Subject: ARM: dma-mapping: don't allow DMA mappings to be marked executable
|
|
|
|
DMA mapping permissions were being derived from pgprot_kernel directly
|
|
without using PAGE_KERNEL. This causes them to be marked with executable
|
|
permission, which is not what we want. Fix this.
|
|
|
|
Change-Id: Ib40f59f3c569f82409943cf8f9a86a9869d922cc
|
|
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
Git-commit: 0ea1ec713f04bdfac343c9702b21cd3a7c711826
|
|
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
|
[lauraa@codeaurora.org: dropped functions not in older builds]
|
|
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
|
|
---
|
|
arch/arm/mm/dma-mapping.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
|
index 230dfe0ef..935bb9a 100644
|
|
--- a/arch/arm/mm/dma-mapping.c
|
|
+++ b/arch/arm/mm/dma-mapping.c
|
|
@@ -657,7 +657,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
|
|
void *arm_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
|
|
gfp_t gfp, struct dma_attrs *attrs)
|
|
{
|
|
- pgprot_t prot = __get_dma_pgprot(attrs, pgprot_kernel);
|
|
+ pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL);
|
|
void *memory;
|
|
bool no_kernel_mapping = dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING,
|
|
attrs);
|
|
--
|
|
cgit v1.1
|
|
|