[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191117221310.775789832@goodmis.org>
Date: Sun, 17 Nov 2019 17:13:01 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [for-next][PATCH 5/7] ftrace: Fix accounting bug with direct->count in
register_ftrace_direct()
From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
The direct->count wasn't being updated properly, where it only was updated
when the first entry was added, but should be updated every time.
Fixes: 013bf0da04748 ("ftrace: Add ftrace_find_direct_func()")
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/trace/ftrace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 834f3556ea1e..32e4e5ffdd97 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5093,8 +5093,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
ftrace_direct_func_count--;
}
} else {
- if (!direct->count)
- direct->count++;
+ direct->count++;
}
out_unlock:
mutex_unlock(&direct_mutex);
--
2.24.0
Powered by blists - more mailing lists