Re: 2.6.24-rc2-mm1 (memory hotplug x86_64/vmemmap fix)

From: KAMEZAWA Hiroyuki
Date: Thu Nov 15 2007 - 05:04:01 EST


On Thu, 15 Nov 2007 09:39:15 +0000
Andy Whitcroft <apw@xxxxxxxxxxxx> wrote:

> Can you explain "this is bug" for me. The routine was __init_refok and
> therefore ! __init and therefore always present. The logic there must
> guarentee it only calls the bootmem allocator in early boot, and the logic
> has not changed with the annotation change so it should have been safe.
> If by "this is bug" you are saying this is the cause of the warning then
> yes that is true, else could you elaborate.
>
Sorry I misunderstood that __init.refok is a section which is freed after boot.
I confrimed it's just a .text section. sorry.


> > +static void __init_refok *__call_bootmem_alloc(int nid, int array_size)
>
> This indirect makes sense for the sparse safety aspect, only letting the
> caller use this one routine. I wonder if the name should be more
> explicit. earlyonly_bootmem_alloc() or something, so that a later
> reader knows from the call site that this is magical and care needs to
> be exercised here.
ok.

Thank you for review.

-Kame

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