aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-11 13:50:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-11 13:50:44 -0700
commit02150fab6ae9924ef03e21a15f2d5f7415a9cdf7 (patch)
tree5084cab9f309a8d768bae6d5b74501d6dd8b00f4 /kernel
parentMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentstacktrace: Use PF_KTHREAD to check for kernel threads (diff)
downloadlinux-dev-02150fab6ae9924ef03e21a15f2d5f7415a9cdf7.tar.xz
linux-dev-02150fab6ae9924ef03e21a15f2d5f7415a9cdf7.zip
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull stacktrace fix from Thomas Gleixner: "Fix yet another instance of kernel thread check which ignores that kernel threads can call use_mm()" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stacktrace: Use PF_KTHREAD to check for kernel threads
Diffstat (limited to 'kernel')
-rw-r--r--kernel/stacktrace.c2
1 files changed, 1 insertions, 1 deletions
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));