From 7672340484d751b309756d7721c8bdc5b293bbc2 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Tue, 3 Sep 2019 17:32:15 -0700 Subject: [PATCH] ion: Use correct heap when freeing secure system heap buffers Switch the heap for buffers from the secure system heap in the free path, so that they can be properly released into the secure pools. Change-Id: I9873d73efa6f56a2c2ceb8d29e4b594ff30b9bca Signed-off-by: Isaac J. Manjarres --- drivers/staging/android/ion/ion_system_secure_heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion_system_secure_heap.c b/drivers/staging/android/ion/ion_system_secure_heap.c index a7cb38d81173..a3f85418dad5 100644 --- a/drivers/staging/android/ion/ion_system_secure_heap.c +++ b/drivers/staging/android/ion/ion_system_secure_heap.c @@ -66,6 +66,7 @@ static void ion_system_secure_heap_free(struct ion_buffer *buffer) struct ion_system_secure_heap *secure_heap = to_system_secure_heap(heap); + buffer->heap = secure_heap->sys_heap; secure_heap->sys_heap->ops->free(buffer); }