From d35fffbde5a81a7eaa071e321e50430d5ed81c98 Mon Sep 17 00:00:00 2001 From: Chris Goldsworthy Date: Thu, 19 Dec 2019 18:25:32 -0800 Subject: [PATCH] ion: Fix pool refill error When performing secure pool allocations, it's possible to spuriously trigger pool refill attempts for the cached and uncached pools. Fix this by adding a check to see if we're performing a secure allocation or not, before refilling a pool. Change-Id: I9a415a302ca92790e6a793784020b09dea6a86e1 Signed-off-by: Chris Goldsworthy --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 22ad52b5f242..3aa424fb21bd 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -79,7 +79,7 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap, page = ion_page_pool_alloc(pool, from_pool); if (pool_auto_refill_en && - pool_count_below_lowmark(pool)) { + pool_count_below_lowmark(pool) && vmid <= 0) { wake_up_process(heap->kworker[cached]); }