From 0e769f26528b4c7af0df2f83f7a34ae21be3aab7 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_qcom | 1 + 1 file changed, 1 insertion(+) diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 7493e0895804..df96cca11470 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -632,6 +632,7 @@ flow_rule_match_ports flow_rule_match_vlan flush_dcache_page + flush_delayed_fput flush_delayed_work flush_work flush_workqueue