]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - kernel/taskstats.c
taskstats: add_del_listener() should ignore !valid listeners
[~shefty/rdma-dev.git] / kernel / taskstats.c
index a09a54936f1927d3f72cea4569f2a675748b8c0d..e19ce1454ee1d6d2e347e8c287abf2fe68fcc9e1 100644 (file)
@@ -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);