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

Commit 4d6092f0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: Restore secure system heap buffers' heap pointer after being freed"

parents 2247d97c 387fa740
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -68,6 +68,12 @@ static void ion_system_secure_heap_free(struct ion_buffer *buffer)

	buffer->heap = secure_heap->sys_heap;
	secure_heap->sys_heap->ops->free(buffer);
	/*
	 * Restore buffer's heap pointer to the system secure heap, so that
	 * the ION memory accounting code uses the system secure heap's stats
	 * instead of the system heap stats.
	 */
	buffer->heap = heap;
}

static int ion_system_secure_heap_allocate(struct ion_heap *heap,