summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/tracepoint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 1a6a453b7efb..9489a0a9b1be 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -597,7 +597,9 @@ void syscall_regfunc(void)
if (!sys_tracepoint_refcount) {
read_lock_irqsave(&tasklist_lock, flags);
do_each_thread(g, t) {
- set_tsk_thread_flag(t, TIF_SYSCALL_TRACEPOINT);
+ /* Skip kernel threads. */
+ if (t->mm)
+ set_tsk_thread_flag(t, TIF_SYSCALL_TRACEPOINT);
} while_each_thread(g, t);
read_unlock_irqrestore(&tasklist_lock, flags);
}