.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
7 | 4 | * |
---|
8 | 5 | * This is an implementation of a DWARF unwinder. Its main purpose is |
---|
9 | 6 | * for generating stacktrace information. Based on the DWARF 3 |
---|
.. | .. |
---|
608 | 605 | * expected to find the real return address. |
---|
609 | 606 | */ |
---|
610 | 607 | if (pc == (unsigned long)&return_to_handler) { |
---|
611 | | - int index = current->curr_ret_stack; |
---|
| 608 | + struct ftrace_ret_stack *ret_stack; |
---|
612 | 609 | |
---|
| 610 | + ret_stack = ftrace_graph_get_ret_stack(current, 0); |
---|
| 611 | + if (ret_stack) |
---|
| 612 | + pc = ret_stack->ret; |
---|
613 | 613 | /* |
---|
614 | 614 | * We currently have no way of tracking how many |
---|
615 | 615 | * return_to_handler()'s we've seen. If there is more |
---|
616 | 616 | * than one patched return address on our stack, |
---|
617 | 617 | * complain loudly. |
---|
618 | 618 | */ |
---|
619 | | - WARN_ON(index > 0); |
---|
620 | | - |
---|
621 | | - pc = current->ret_stack[index].ret; |
---|
| 619 | + WARN_ON(ftrace_graph_get_ret_stack(current, 1)); |
---|
622 | 620 | } |
---|
623 | 621 | #endif |
---|
624 | 622 | |
---|