From 2c2b3a46d5f0fb0650243a24fea5cd0182414c35 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Nov 2021 14:10:39 +0100 Subject: [PATCH] Revert "ANDROID: futex: Add vendor hook for wait queue" This reverts commit 3ba4b6d6a39aeb026363e1d410c9b968e451e794. The futex code is changed in large ways in 5.16-rc1, so the hook here is no longer relevant and causes merge conflicts. It will have to be re-added if it is still needed in the future. Bug: 163431711 Cc: JianMin Liu Signed-off-by: Greg Kroah-Hartman Change-Id: I318ed87ac80ef7d4fb55240d55f74efb291b7907 --- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/futex.h | 22 ---------------------- kernel/futex.c | 6 +----- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 include/trace/hooks/futex.h diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 24264e6e1e71..5ad033fbd1e3 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +70,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_finished); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_start); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_read_wait_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_wait_start); diff --git a/include/trace/hooks/futex.h b/include/trace/hooks/futex.h deleted file mode 100644 index 9330f034a2ae..000000000000 --- a/include/trace/hooks/futex.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM futex -#undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH trace/hooks -#if !defined(_TRACE_HOOK_FUTEX_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HOOK_FUTEX_H -#include -#include -#include -/* - * Following tracepoints are not exported in tracefs and provide a - * mechanism for vendor modules to hook and extend functionality - */ -DECLARE_HOOK(android_vh_alter_futex_plist_add, - TP_PROTO(struct plist_node *node, - struct plist_head *head, - bool *already_on_hb), - TP_ARGS(node, head, already_on_hb)); -#endif /* _TRACE_HOOK_FUTEX_H */ -/* This part must be outside protection */ -#include diff --git a/kernel/futex.c b/kernel/futex.c index 54bdf8860345..c15ad276fd15 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -43,7 +43,6 @@ #include #include "locking/rtmutex_common.h" -#include /* * READ this before attempting to hack on futexes! @@ -2476,7 +2475,6 @@ queue_unlock(struct futex_hash_bucket *hb) static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) { int prio; - bool already_on_hb = false; /* * The priority used to register this element is @@ -2489,9 +2487,7 @@ static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) prio = min(current->normal_prio, MAX_RT_PRIO); plist_node_init(&q->list, prio); - trace_android_vh_alter_futex_plist_add(&q->list, &hb->chain, &already_on_hb); - if (!already_on_hb) - plist_add(&q->list, &hb->chain); + plist_add(&q->list, &hb->chain); q->task = current; }