From e4d293dc33b5fa97b7965447fe6c3f6796af01c9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 21 Feb 2022 19:08:47 +0100 Subject: [PATCH] Revert "ANDROID: vendor_hooks: Add hooks for binder proc transaction" This reverts commit cb7e10d31bca4f247c34d6791d6db048edf7e7a8. The hook android_vh_binder_proc_transaction_finish is not used by any vendor, so remove it to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 203756332 Bug: 208910215 Cc: Liujie Xie Signed-off-by: Greg Kroah-Hartman Change-Id: I19c6660c138dc88e554e62d309484d75ec24dc6c --- drivers/android/binder.c | 3 +-- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/binder.h | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index b4941e5ca357..c51478a185cc 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2535,8 +2535,7 @@ static int binder_proc_transaction(struct binder_transaction *t, trace_android_vh_binder_proc_transaction_end(current, proc->tsk, thread ? thread->task : NULL, t->code, pending_async, !oneway); - trace_android_vh_binder_proc_transaction_finish(proc, t, - thread ? thread->task : NULL, pending_async, !oneway); + if (!pending_async) binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */); diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 5dba08ab132e..ef6b8e851608 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -279,7 +279,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg); diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index 63a9b19d7e7d..42d974f76573 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -69,10 +69,6 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_end, struct task_struct *binder_th_task, unsigned int code, bool pending_async, bool sync), TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync)); -DECLARE_HOOK(android_vh_binder_proc_transaction_finish, - TP_PROTO(struct binder_proc *proc, struct binder_transaction *t, - struct task_struct *binder_th_task, bool pending_async, bool sync), - TP_ARGS(proc, t, binder_th_task, pending_async, sync)); DECLARE_HOOK(android_vh_binder_new_ref, TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id), TP_ARGS(proc, ref_desc, node_debug_id)); @@ -102,7 +98,6 @@ DECLARE_HOOK(android_vh_binder_read_done, DECLARE_HOOK(android_vh_binder_has_work_ilocked, TP_PROTO(struct binder_thread *thread, bool do_proc_work, int *ret), TP_ARGS(thread, do_proc_work, ret)); - /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_BINDER_H */