mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
gpu: ion: Only map as much of the vma as the user requested
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com> [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>
This commit is contained in:
parent
55808b8d4d
commit
b82302438b
1 changed files with 2 additions and 0 deletions
|
|
@ -192,6 +192,8 @@ int ion_system_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
|
|||
remap_pfn_range(vma, addr, page_to_pfn(sg_page(sg)),
|
||||
sg_dma_len(sg), vma->vm_page_prot);
|
||||
addr += sg_dma_len(sg);
|
||||
if (addr >= vma->vm_end)
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue