Commit 4f597eac authored by Rebecca Schultz Zavin's avatar Rebecca Schultz Zavin Committed by Greg Kroah-Hartman

gpu: ion: Fix bug in zeroing pages in system heap

Pages are zeroed for security purposes when returned to the
ion heap.  There was a bug in this code preventing this
from happening.

Bug: 7573871
Signed-off-by: default avatarRebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b308a7c5
...@@ -103,7 +103,7 @@ static void free_buffer_page(struct ion_system_heap *heap, ...@@ -103,7 +103,7 @@ static void free_buffer_page(struct ion_system_heap *heap,
security. This uses vmap as we want to set the pgprot so security. This uses vmap as we want to set the pgprot so
the writes to occur to noncached mappings, as the pool's the writes to occur to noncached mappings, as the pool's
purpose is to keep the pages out of the cache */ purpose is to keep the pages out of the cache */
for (i = 0; i < order / PAGE_SIZE; i++) { for (i = 0; i < (1 << order); i++) {
struct page *sub_page = page + i; struct page *sub_page = page + i;
void *addr = vmap(&sub_page, 1, VM_MAP, void *addr = vmap(&sub_page, 1, VM_MAP,
pgprot_writecombine(PAGE_KERNEL)); pgprot_writecombine(PAGE_KERNEL));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment