From: Puranjay Mohan <puranjay@kernel.org>
To: Guo Ren <guoren@kernel.org>, Steven Rostedt <rostedt@goodmis.org>,
linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: puranjay12@gmail.com
Subject: [PATCH] csky: stacktrace: fix usage of ftrace_graph_ret_addr()
Date: Wed, 19 Jun 2024 07:31:40 +0000 [thread overview]
Message-ID: <20240619073140.48817-1-puranjay@kernel.org> (raw)
ftrace_graph_ret_addr() now returns the passed in return address when NULL
is passed for the 'idx' paramenter. This breaks the current usage in csky's
walk_stackframe()
Fix this by passing a valid integer pointer to ftrace_graph_ret_addr()
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
---
arch/csky/kernel/stacktrace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/csky/kernel/stacktrace.c b/arch/csky/kernel/stacktrace.c
index 27ecd63e321b..1d72f18064c2 100644
--- a/arch/csky/kernel/stacktrace.c
+++ b/arch/csky/kernel/stacktrace.c
@@ -17,6 +17,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
bool (*fn)(unsigned long, void *), void *arg)
{
unsigned long fp, sp, pc;
+ int graph_idx = 0;
if (regs) {
fp = frame_pointer(regs);
@@ -50,7 +51,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
frame = (struct stackframe *)fp;
sp = fp;
fp = frame->fp;
- pc = ftrace_graph_ret_addr(current, NULL, frame->ra,
+ pc = ftrace_graph_ret_addr(current, &graph_idx, frame->ra,
(unsigned long *)(fp - 8));
}
}
--
2.40.1
next reply other threads:[~2024-06-19 7:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 7:31 Puranjay Mohan [this message]
2024-06-23 16:43 ` Guo Ren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240619073140.48817-1-puranjay@kernel.org \
--to=puranjay@kernel.org \
--cc=guoren@kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=puranjay12@gmail.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome