diff --git a/kernel/cpuset.c b/kernel/cpuset.c index f57854b0892275d901e9e1b7b8f2e4784adcc37a..4c49188cc49b67d6f172c5d7d12743109c1f9e3e 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1682,9 +1682,9 @@ static int pid_array_load(pid_t *pidarray, int npids, struct cpuset *cs) do_each_thread(g, p) { if (p->cpuset == cs) { - pidarray[n++] = p->pid; if (unlikely(n == npids)) goto array_full; + pidarray[n++] = p->pid; } } while_each_thread(g, p);