mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
ANDROID: vendor_hooks: add hook in __mutex_unlock_slowpath()
This hook is used to modify the variables in mutex oemdata when the task releases mutex lock. This code cannot be done in existing hook trace_android_vh_mutex_unlock_slowpath(), because it is executed after wake_up_q, and there is a risk that the mutex object has been freed. Bug: 362700382 Change-Id: I7787c0ea51959642a010891606b2bc39fe056dd2 Signed-off-by: zhujingpeng <zhujingpeng@vivo.com>
This commit is contained in:
parent
8a0f09e1bc
commit
9f6bd03727
|
@ -293,6 +293,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_panic_unhandled);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gzvm_vcpu_exit_reason);
|
||||
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_before_wakeq);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_save_track_hash);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_should_fault_around);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mem_cgroup_id_remove);
|
||||
|
|
|
@ -97,6 +97,9 @@ DECLARE_HOOK(android_vh_alter_mutex_list_add,
|
|||
DECLARE_HOOK(android_vh_mutex_unlock_slowpath,
|
||||
TP_PROTO(struct mutex *lock),
|
||||
TP_ARGS(lock));
|
||||
DECLARE_HOOK(android_vh_mutex_unlock_slowpath_before_wakeq,
|
||||
TP_PROTO(struct mutex *lock),
|
||||
TP_ARGS(lock));
|
||||
|
||||
DECLARE_HOOK(android_vh_exit_signal_whether_wake,
|
||||
TP_PROTO(struct task_struct *p, bool *wake),
|
||||
|
|
|
@ -974,6 +974,7 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne
|
|||
if (owner & MUTEX_FLAG_HANDOFF)
|
||||
__mutex_handoff(lock, next);
|
||||
|
||||
trace_android_vh_mutex_unlock_slowpath_before_wakeq(lock);
|
||||
raw_spin_unlock(&lock->wait_lock);
|
||||
|
||||
wake_up_q(&wake_q);
|
||||
|
|
Loading…
Reference in New Issue
Block a user