From 91d8cca51891869bee4c9d64677fd6186d3f6430 Mon Sep 17 00:00:00 2001 From: Raul Martinez Date: Tue, 31 Jan 2023 11:25:10 -0800 Subject: [PATCH] ANDROID: vendor_hooks: Add parameter to android_vh_wake_up_sync Extend vendor hook definition to add a sock struct pointer parameter in useful vendor hook to modify wake flag. android_vh_do_wake_up_sync Modified definition to include sock struct pointer param Bug: 267294957 Change-Id: I49fe4a44e66e0ac2ebb975a710c184361d8b0c94 Signed-off-by: Raul Martinez Signed-off-by: Subash Abhinov Kasiviswanathan --- include/trace/hooks/sched.h | 4 ++-- net/core/sock.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 8a8b5a7bda43..e978b679219f 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -318,8 +318,8 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_thermal_stats, TP_ARGS(cpu), 1); DECLARE_HOOK(android_vh_do_wake_up_sync, - TP_PROTO(struct wait_queue_head *wq_head, int *done), - TP_ARGS(wq_head, done)); + TP_PROTO(struct wait_queue_head *wq_head, int *done, struct sock *sk), + TP_ARGS(wq_head, done, sk)); DECLARE_HOOK(android_vh_set_wake_flags, TP_PROTO(int *wake_flags, unsigned int *mode), diff --git a/net/core/sock.c b/net/core/sock.c index 059577f8ece5..c71c2281a7c5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3276,7 +3276,7 @@ void sock_def_readable(struct sock *sk) if (skwq_has_sleeper(wq)) { int done = 0; - trace_android_vh_do_wake_up_sync(&wq->wait, &done); + trace_android_vh_do_wake_up_sync(&wq->wait, &done, sk); if (done) goto out;