.. | .. |
---|
1771 | 1771 | perf_callchain_store(entry, pc); |
---|
1772 | 1772 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
---|
1773 | 1773 | if ((pc + 8UL) == (unsigned long) &return_to_handler) { |
---|
1774 | | - int index = current->curr_ret_stack; |
---|
1775 | | - if (current->ret_stack && index >= graph) { |
---|
1776 | | - pc = current->ret_stack[index - graph].ret; |
---|
| 1774 | + struct ftrace_ret_stack *ret_stack; |
---|
| 1775 | + ret_stack = ftrace_graph_get_ret_stack(current, |
---|
| 1776 | + graph); |
---|
| 1777 | + if (ret_stack) { |
---|
| 1778 | + pc = ret_stack->ret; |
---|
1777 | 1779 | perf_callchain_store(entry, pc); |
---|
1778 | 1780 | graph++; |
---|
1779 | 1781 | } |
---|
.. | .. |
---|
1853 | 1855 | { |
---|
1854 | 1856 | u64 saved_fault_address = current_thread_info()->fault_address; |
---|
1855 | 1857 | u8 saved_fault_code = get_thread_fault_code(); |
---|
1856 | | - mm_segment_t old_fs; |
---|
1857 | 1858 | |
---|
1858 | 1859 | perf_callchain_store(entry, regs->tpc); |
---|
1859 | 1860 | |
---|
1860 | 1861 | if (!current->mm) |
---|
1861 | 1862 | return; |
---|
1862 | | - |
---|
1863 | | - old_fs = get_fs(); |
---|
1864 | | - set_fs(USER_DS); |
---|
1865 | 1863 | |
---|
1866 | 1864 | flushw_user(); |
---|
1867 | 1865 | |
---|
.. | .. |
---|
1874 | 1872 | |
---|
1875 | 1873 | pagefault_enable(); |
---|
1876 | 1874 | |
---|
1877 | | - set_fs(old_fs); |
---|
1878 | 1875 | set_thread_fault_code(saved_fault_code); |
---|
1879 | 1876 | current_thread_info()->fault_address = saved_fault_address; |
---|
1880 | 1877 | } |
---|