File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 43
43
#include <asm/io_bitmap.h>
44
44
#include <asm/proto.h>
45
45
#include <asm/frame.h>
46
+ #include <asm/unwind.h>
46
47
47
48
#include "process.h"
48
49
@@ -944,10 +945,20 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
944
945
*/
945
946
unsigned long __get_wchan (struct task_struct * p )
946
947
{
947
- unsigned long entry = 0 ;
948
+ struct unwind_state state ;
949
+ unsigned long addr = 0 ;
948
950
949
- stack_trace_save_tsk (p , & entry , 1 , 0 );
950
- return entry ;
951
+ for (unwind_start (& state , p , NULL , NULL ); !unwind_done (& state );
952
+ unwind_next_frame (& state )) {
953
+ addr = unwind_get_return_address (& state );
954
+ if (!addr )
955
+ break ;
956
+ if (in_sched_functions (addr ))
957
+ continue ;
958
+ break ;
959
+ }
960
+
961
+ return addr ;
951
962
}
952
963
953
964
long do_arch_prctl_common (struct task_struct * task , int option ,
You can’t perform that action at this time.
0 commit comments