From 7887091009b24fc74bd7478d92ed5aab9adc815e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 21 Oct 2021 09:26:52 +0200 Subject: [PATCH] Revert "ANDROID: sysrq: add vendor hook for sysrq crash information" This reverts commit 0d8928ed6ee38f00f3595e1f3b623de0d99c311d. The hook android_vh_sysrq_crash 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: 170234110 Cc: Sangmoon Kim Signed-off-by: Greg Kroah-Hartman Change-Id: I1b4b9280081e0fb569bb74c7f0d3efcb18728b48 --- drivers/android/vendor_hooks.c | 2 -- drivers/tty/sysrq.c | 4 ---- include/trace/hooks/sysrqcrash.h | 22 ---------------------- 3 files changed, 28 deletions(-) delete mode 100644 include/trace/hooks/sysrqcrash.h diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 63a06d02a9a1..8b3800240250 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -126,7 +125,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_printk_hotplug); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_jiffies_update); diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 8f01cde61d20..959f9e121cc6 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -55,8 +55,6 @@ #include #include -#include - /* Whether we react on sysrq keys or just ignore them */ static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE; static bool __read_mostly sysrq_always_enabled; @@ -153,8 +151,6 @@ static void sysrq_handle_crash(int key) /* release the RCU read lock before crashing */ rcu_read_unlock(); - trace_android_vh_sysrq_crash(current); - panic("sysrq triggered crash\n"); } static const struct sysrq_key_op sysrq_crash_op = { diff --git a/include/trace/hooks/sysrqcrash.h b/include/trace/hooks/sysrqcrash.h deleted file mode 100644 index d163f898a9f6..000000000000 --- a/include/trace/hooks/sysrqcrash.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM sysrqcrash -#define TRACE_INCLUDE_PATH trace/hooks - -#if !defined(_TRACE_HOOK_SYSRQCRASH_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HOOK_SYSRQCRASH_H -#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_sysrq_crash, - TP_PROTO(void *data), - TP_ARGS(data)); - -/* macro versions of hooks are no longer required */ - -#endif /* _TRACE_HOOK_SYSRQCRASH_H */ -/* This part must be outside protection */ -#include