Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kernel / dumpstack.c
index 28f98706b08b5d4671611791ccb5c39041a8583e..1b81839b6c8890f261e486429db51f37a9c68042 100644 (file)
@@ -37,13 +37,16 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
                        const struct stacktrace_ops *ops,
                        struct thread_info *tinfo, int *graph)
 {
-       struct task_struct *task = tinfo->task;
+       struct task_struct *task;
        unsigned long ret_addr;
-       int index = task->curr_ret_stack;
+       int index;
 
        if (addr != (unsigned long)return_to_handler)
                return;
 
+       task = tinfo->task;
+       index = task->curr_ret_stack;
+
        if (!task->ret_stack || index < *graph)
                return;