diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c index 36139de0a3c4..c8d0f05721a1 100644 --- a/kernel/stacktrace.c +++ b/kernel/stacktrace.c @@ -228,7 +228,7 @@ unsigned int stack_trace_save_user(unsigned long *store, unsigned int size) }; /* Trace user stack if not a kernel thread */ - if (!current->mm) + if (current->flags & PF_KTHREAD) return 0; arch_stack_walk_user(consume_entry, &c, task_pt_regs(current));