]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/trace/trace_events.c
tracing: Call on_each_cpu() when adding or removing single pids from set_event_pid
[linux.git] / kernel / trace / trace_events.c
index fb0261e90acc8534fcaf21fd566bbe2f3a447743..292bccf3e0112f7ad348c4c47b6252ea15355393 100644 (file)
@@ -1729,14 +1729,15 @@ ftrace_event_pid_write(struct file *filp, const char __user *ubuf,
                                                 tr, INT_MAX);
                register_trace_prio_sched_wakeup(event_filter_pid_sched_wakeup_probe_post,
                                                 tr, 0);
-
-               /*
-                * Ignoring of pids is done at task switch. But we have to
-                * check for those tasks that are currently running.
-                */
-               on_each_cpu(ignore_task_cpu, tr, 1);
        }
 
+       /*
+        * Ignoring of pids is done at task switch. But we have to
+        * check for those tasks that are currently running.
+        * Always do this in case a pid was appended or removed.
+        */
+       on_each_cpu(ignore_task_cpu, tr, 1);
+
        mutex_unlock(&event_mutex);
 
        ret = read;