Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f9dbcc5 authored by Vijayanand Jitta's avatar Vijayanand Jitta
Browse files

ion: Check for PagePrivate in free_buffer_page



There is a possibility of non secure pages getting added
to secure pool one such case is in secure system heap alloc
failure path, Fix this by checking if page is private before
selecting the pool.

Change-Id: I5d7e94040fcbdb7aa2621eb537c8bc249887fc4f
Signed-off-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
parent f4a83a44
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ void free_buffer_page(struct ion_msm_system_heap *heap,
	if (!(buffer->flags & ION_FLAG_POOL_FORCE_ALLOC)) {
		struct ion_msm_page_pool *pool;

		if (vmid > 0)
		if (vmid > 0 && PagePrivate(page))
			pool = heap->secure_pools[vmid][order_to_index(order)];
		else if (cached)
			pool = heap->cached_pools[order_to_index(order)];