diff options
author | Laura Abbott <lauraa@codeaurora.org> | 2013-12-13 14:23:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-14 08:55:37 -0800 |
commit | 7b903e44c40fdd8300582b0791ef20b70d81178c (patch) | |
tree | 01d68828c28e28d22e27e8d401836244beb32152 /drivers/staging/android/ion | |
parent | 2900cd767180e9674947101fea96e318dc9b23eb (diff) |
gpu: ion: Map only the vma size given
When mapping carveout buffers into userspace, only map
the size of the vma given, not the full size of the buffer
since clients may map less than the buffer size.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion')
-rw-r--r-- | drivers/staging/android/ion/ion_carveout_heap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_carveout_heap.c b/drivers/staging/android/ion/ion_carveout_heap.c index e8c4e36d5328..16f4fc7da414 100644 --- a/drivers/staging/android/ion/ion_carveout_heap.c +++ b/drivers/staging/android/ion/ion_carveout_heap.c @@ -116,7 +116,7 @@ int ion_carveout_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, { return remap_pfn_range(vma, vma->vm_start, __phys_to_pfn(buffer->priv_phys) + vma->vm_pgoff, - buffer->size, + vma->vm_end - vma->vm_start, pgprot_noncached(vma->vm_page_prot)); } |