summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/taskstats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index a09a54936f1..e19ce1454ee 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -304,7 +304,7 @@ static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd)
listeners = &per_cpu(listener_array, cpu);
down_write(&listeners->sem);
list_for_each_entry(s2, &listeners->list, list) {
- if (s2->pid == pid)
+ if (s2->pid == pid && s2->valid)
goto exists;
}
list_add(&s->list, &listeners->list);