Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Demon000/339c91bf4dceb9dfed4e15504e83d9dc to your computer and use it in GitHub Desktop.
Save Demon000/339c91bf4dceb9dfed4e15504e83d9dc to your computer and use it in GitHub Desktop.
From 128fe6b1cf0a9f2041714cf60e7d8ced210af902 Mon Sep 17 00:00:00 2001
From: Cosmin Tanislav <demonsingur@gmail.com>
Date: Fri, 11 Dec 2020 18:42:22 -0500
Subject: [PATCH] runtime: task_finder: remove unused stack variables
---
runtime/linux/task_finder.c | 7 -------
runtime/linux/task_finder2.c | 8 --------
2 files changed, 15 deletions(-)
diff --git a/runtime/linux/task_finder.c b/runtime/linux/task_finder.c
index 8b95f3e..1da01c3 100644
--- a/runtime/linux/task_finder.c
+++ b/runtime/linux/task_finder.c
@@ -383,8 +383,6 @@ static void
stap_utrace_detach_ops(struct utrace_engine_ops *ops)
{
struct task_struct *grp, *tsk;
- struct utrace_engine *engine;
- pid_t pid = 0;
int rc = 0;
int ops_matched;
int iterations = 0;
@@ -1069,10 +1067,6 @@ __stp_utrace_task_finder_report_exec(enum utrace_resume_action action,
#if defined(UTRACE_API_VERSION) && (UTRACE_API_VERSION >= 20091216)
struct task_struct *tsk = current;
#endif
- size_t filelen;
- struct list_head *tgt_node;
- struct stap_task_finder_target *tgt;
- int found_node = 0;
__stp_tf_handler_start();
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) {
@@ -1139,7 +1133,6 @@ __stp_utrace_task_finder_target_exec(enum utrace_resume_action action,
struct task_struct *tsk = current;
#endif
struct stap_task_finder_target *tgt = engine->data;
- int rc;
__stp_tf_handler_start();
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) {
diff --git a/runtime/linux/task_finder2.c b/runtime/linux/task_finder2.c
index 4e0b68f..d445b20 100644
--- a/runtime/linux/task_finder2.c
+++ b/runtime/linux/task_finder2.c
@@ -432,8 +432,6 @@ static void
stap_utrace_detach_ops(struct utrace_engine_ops *ops)
{
struct task_struct *grp, *tsk;
- struct utrace_engine *engine;
- pid_t pid = 0;
int rc = 0;
// Notice we're not calling get_task_mm() in this loop. In
@@ -1111,11 +1109,6 @@ __stp_utrace_task_finder_report_exec(u32 action,
const struct linux_binprm *bprm,
struct pt_regs *regs)
{
- size_t filelen;
- struct list_head *tgt_node;
- struct stap_task_finder_target *tgt;
- int found_node = 0;
-
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) {
debug_task_finder_detach();
return UTRACE_DETACH;
@@ -1153,7 +1146,6 @@ __stp_utrace_task_finder_target_exec(u32 action,
{
struct task_struct *tsk = current;
struct stap_task_finder_target *tgt = engine->data;
- int rc;
if (atomic_read(&__stp_task_finder_state) != __STP_TF_RUNNING) {
debug_task_finder_detach();
--
1.8.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment