ANDROID: GKI: dma-buf: add vendor hook for dma_buf_release

The main function is to check whether the corresponding IOMMU buffer
is unmapped when dmabuf is released, so as to avoid memory coverage
caused by IOMMU.

Bug: 438090847
Change-Id: I56ae3f0994cd4f3d24494b7972e4d89d0f004da8
Signed-off-by: Gaofeng Sheng <gaofeng.sheng@unisoc.com>
(cherry picked from commit 8879650556ed747baf5a4d3037d687a76ccb986f)
This commit is contained in:
Gaofeng Sheng
2022-04-18 14:28:04 +08:00
committed by yan chang
parent affdb774d7
commit 1d3cdeb464
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -29,6 +29,9 @@ DECLARE_HOOK(android_vh_dma_buf_attr_show_start,
DECLARE_HOOK(android_vh_dma_buf_attr_show_end,
TP_PROTO(struct dma_buf *dmabuf),
TP_ARGS(dmabuf));
DECLARE_HOOK(android_vh_dma_buf_release,
TP_PROTO(struct dma_buf *data),
TP_ARGS(data));
#endif /* _TRACE_HOOK_DMABUF_H */
/* This part must be outside protection */
#include <trace/define_trace.h>