Re: [PATCH] Removes extra checking in kernel/cpuset.c

From: Paul Jackson
Date: Thu Jul 31 2008 - 12:15:34 EST


Rakib wrote:
> Hello guys, this patch removes an extra checking over 'cs' in
> functions 'guarantee_online_cpus' and 'guarantee_online_mems'.
> ...
> - while (cs && !cpus_intersects(cs->cpus_allowed, cpu_online_map))
> - cs = cs->parent;
> - if (cs)
> + if (cs) {
> + while (!cpus_intersects(cs->cpus_allowed, cpu_online_map))
> + cs = cs->parent;

I don't think that works - "cs->parent" can be NULL, and will be NULL
if cs is the root cpuset.

So we must check for non-NULL cs each step of the way back up the
cpuset tree.

I must NAQ this patch.

Holler if you think I'm missing something.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.940.382.4214
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/