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
Change-Id: I79c22ee1da98f306199f3a192eaec4e81d5fd059
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
security. This uses vmap as we want to set the pgprot so
the writes to occur to noncached mappings, as the pool's
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;
void *addr = vmap(&sub_page, 1, VM_MAP,
pgprot_writecombine(PAGE_KERNEL));