Re: [PATCH] cpumask: alloc blank cpumask left over

From: Rusty Russell
Date: Sat Jun 06 2009 - 19:43:54 EST


On Sat, 6 Jun 2009 03:04:35 am Linus Torvalds wrote:
> On Fri, 5 Jun 2009, Rusty Russell wrote:
> > OK, here's what I've got in my tree. Ingo, I think this should go in the
> > current -rc to avoid nasty bugs.
>
> Why is the fix not to simply clear it in alloc?

Sure.

> and that
> FIXME is bogus. The end of the allocation needs to be cleared regardless.

Under these new semantics, yep. Before:
alloc_cpumask_var(&mask, GFP_KERNEL);
// New operator only goes to nr_cpu_ids bits.
cpumask_clear(mask);
// Old operator uses all NR_CPUS bits.
BUG_ON(cpus_weight(*mask) != 0);

Thanks,
Rusty.
--
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/