Skip to contentSkip to conversation

Patch "ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 7e31210349e9e03a9a4dff31ab5f2bc83e8e84f5 Mon Sep 17 00:00:00 2001

From: Marek Szyprowski <[email protected]>
Date: Fri, 28 Aug 2015 09:42:09 +0100
Subject: ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()

From: Marek Szyprowski <[email protected]>

commit 7e31210349e9e03a9a4dff31ab5f2bc83e8e84f5 upstream.

IOMMU-based dma_mmap() implementation lacked proper support for offset parameter used in mmap call (it always assumed that mapping starts from offset zero). This patch adds support for offset parameter to IOMMU-based implementation.

---
 arch/arm/mm/dma-mapping.c |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/mm/dma-mapping.c +2 -0
@@ -1406,6 +1406,8 @@ static int arm_iommu_mmap_attrs(struct d
 	if (off >= nr_pages || (usize >> PAGE_SHIFT) > nr_pages - off)
 		return -ENXIO;
 
+	pages += off;
+
 	do {
 		int ret = vm_insert_page(vma, uaddr, *pages++);
 		if (ret) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/arm-8427-1-dma-mapping-add-support-for-offset-parameter-in-dma_mmap.patch queue-4.1/arm-8426-1-dma-mapping-add-missing-range-check-in-dma_mmap.patch