|
@@ -43,6 +43,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
|
unsigned long fp = frame->fp;
|
|
unsigned long fp = frame->fp;
|
|
unsigned long irq_stack_ptr;
|
|
unsigned long irq_stack_ptr;
|
|
|
|
|
|
|
|
+ if (!tsk)
|
|
|
|
+ tsk = current;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Switching between stacks is valid when tracing current and in
|
|
* Switching between stacks is valid when tracing current and in
|
|
* non-preemptible context.
|
|
* non-preemptible context.
|
|
@@ -67,7 +70,7 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
|
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8));
|
|
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8));
|
|
|
|
|
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
- if (tsk && tsk->ret_stack &&
|
|
|
|
|
|
+ if (tsk->ret_stack &&
|
|
(frame->pc == (unsigned long)return_to_handler)) {
|
|
(frame->pc == (unsigned long)return_to_handler)) {
|
|
/*
|
|
/*
|
|
* This is a case where function graph tracer has
|
|
* This is a case where function graph tracer has
|