From 70c9301d9c4be76630901189cc7376eb22115a3b Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Mon, 13 Dec 2021 22:54:29 -0800 Subject: [PATCH] ANDROID: qcom: Add flush_delayed_fput to ABI When a kernel thread calls dma_buf_put() to release the last reference to a dma-buf, fput_many() defers calling the release callback to a workqueue. This means that if the same kernel thread later calls dma_heap_buffer_alloc(), it has no guarantee that the memory from the prior free is available, leading to random failures. As a short-term workaround, call flush_delayed_fput() to ensure the free completes synchronously. Leaf changes summary: 1 artifact changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 1 Added function: [A] 'function void flush_delayed_fput()' Bug: 210598057 Change-Id: Id936aa0bcd410b23b12f4b922b676aa61a358b4c Signed-off-by: Patrick Daly --- android/abi_gki_aarch64.xml | 4 ++++ android/abi_gki_aarch64_qcom | 1 + 2 files changed, 5 insertions(+) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 0ab86c9ebfd3..8c60f8291116 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -2308,6 +2308,7 @@ + @@ -126166,6 +126167,9 @@ + + + diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index f686e734fbb6..e01b646d5bf7 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -899,6 +899,7 @@ finish_wait firmware_request_nowarn flush_dcache_page + flush_delayed_fput flush_delayed_work __flush_icache_range flush_work