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

From: Paul Menage
Date: Thu Jul 31 2008 - 13:10:07 EST


On Thu, Jul 31, 2008 at 9:15 AM, Paul Jackson <pj@xxxxxxx> wrote:
> 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.

True, but if top_cpuset.cpus_allowed doesn't intersect with
cpu_online_map then maybe we have other problems?

Paul
--
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/