]> www.infradead.org Git - nvme.git/commit
arm64: stacktrace: fix the usage of ftrace_graph_ret_addr()
authorPuranjay Mohan <puranjay@kernel.org>
Tue, 18 Jun 2024 16:23:42 +0000 (16:23 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 5 Sep 2024 14:03:35 +0000 (15:03 +0100)
commitc060f93253cad63ea9d41b5b1186a1da32541dec
tree463e683fa08840d4c6f838a8e2ba0bc0b51b9c2c
parent75c8f387dd16066a90c0928d00851edad0c8c519
arm64: stacktrace: fix the usage of ftrace_graph_ret_addr()

ftrace_graph_ret_addr() takes an 'idx' integer pointer that is used to
optimize the stack unwinding process. arm64 currently passes `NULL` for
this parameter which stops it from utilizing these optimizations.

Further, the current code for ftrace_graph_ret_addr() will just return
the passed in return address if it is NULL which will break this usage.

Pass a valid integer pointer to ftrace_graph_ret_addr() similar to
x86_64's stack unwinder.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Fixes: 29c1c24a2707 ("function_graph: Fix up ftrace_graph_ret_addr()")
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20240618162342.28275-1-puranjay@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/stacktrace.c