From 486580ffb5aae2b4e7b277ba2576ecd54d0076f7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 24 Aug 2022 16:45:58 +0200 Subject: [PATCH] Revert "ANDROID: vendor_hooks: Add hooks for mutex" This reverts commit 8c3ac02bcaf8c2167ad5acd18e6a3c23de361763. The hook android_vh_mutex_start_check_new_owner 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: 231647361 Cc: Liujie Xie Signed-off-by: Greg Kroah-Hartman Change-Id: I8c3bf787525d684f64b8d0654d379df78eb7b69e --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/dtask.h | 4 +--- kernel/locking/mutex.c | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 1a22772d64f1..5b48337b53a1 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -249,7 +249,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_build_sched_domains); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_mutex_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_unlock_slowpath); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_unlock_slowpath_end); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_start_check_new_owner); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_undefinstr); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_ptrauth_fault); diff --git a/include/trace/hooks/dtask.h b/include/trace/hooks/dtask.h index fcf0ea550455..208edf8ac265 100644 --- a/include/trace/hooks/dtask.h +++ b/include/trace/hooks/dtask.h @@ -68,9 +68,6 @@ DECLARE_HOOK(android_vh_mutex_unlock_slowpath, DECLARE_HOOK(android_vh_mutex_unlock_slowpath_end, TP_PROTO(struct mutex *lock, struct task_struct *next), TP_ARGS(lock, next)); -DECLARE_HOOK(android_vh_mutex_start_check_new_owner, - TP_PROTO(struct mutex *lock), - TP_ARGS(lock)); DECLARE_HOOK(android_vh_record_mutex_lock_starttime, TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), TP_ARGS(tsk, settime_jiffies)); @@ -83,6 +80,7 @@ DECLARE_HOOK(android_vh_record_rwsem_lock_starttime, DECLARE_HOOK(android_vh_record_percpu_rwsem_lock_starttime, TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), TP_ARGS(tsk, settime_jiffies)); + /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_DTASK_H */ diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 4fa524e21420..93020a888b09 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -1053,7 +1053,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, goto err; } - trace_android_vh_mutex_start_check_new_owner(lock); spin_unlock(&lock->wait_lock); schedule_preempt_disabled();