hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/sh/kernel/dwarf.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Copyright (C) 2009 Matt Fleming <matt@console-pimps.org>
3
- *
4
- * This file is subject to the terms and conditions of the GNU General Public
5
- * License. See the file "COPYING" in the main directory of this archive
6
- * for more details.
74 *
85 * This is an implementation of a DWARF unwinder. Its main purpose is
96 * for generating stacktrace information. Based on the DWARF 3
....@@ -608,17 +605,18 @@
608605 * expected to find the real return address.
609606 */
610607 if (pc == (unsigned long)&return_to_handler) {
611
- int index = current->curr_ret_stack;
608
+ struct ftrace_ret_stack *ret_stack;
612609
610
+ ret_stack = ftrace_graph_get_ret_stack(current, 0);
611
+ if (ret_stack)
612
+ pc = ret_stack->ret;
613613 /*
614614 * We currently have no way of tracking how many
615615 * return_to_handler()'s we've seen. If there is more
616616 * than one patched return address on our stack,
617617 * complain loudly.
618618 */
619
- WARN_ON(index > 0);
620
-
621
- pc = current->ret_stack[index].ret;
619
+ WARN_ON(ftrace_graph_get_ret_stack(current, 1));
622620 }
623621 #endif
624622